Use Supplier variants of Assert methods

See gh-22699
This commit is contained in:
dreis2211
2020-08-02 09:12:40 +02:00
committed by Stephane Nicoll
parent bb3066f61a
commit e49e2dfff1
17 changed files with 32 additions and 28 deletions

View File

@@ -113,8 +113,8 @@ public class Builder {
private void assertStackIdsMatch(Image runImage, Image builderImage) {
StackId runImageStackId = StackId.fromImage(runImage);
StackId builderImageStackId = StackId.fromImage(builderImage);
Assert.state(runImageStackId.equals(builderImageStackId),
"Run image stack '" + runImageStackId + "' does not match builder stack '" + builderImageStackId + "'");
Assert.state(runImageStackId.equals(builderImageStackId), () -> "Run image stack '" + runImageStackId
+ "' does not match builder stack '" + builderImageStackId + "'");
}
private void executeLifecycle(BuildRequest request, EphemeralBuilder builder) throws IOException {