Polish "Use Supplier variants of Assert methods"

Closes gh-12630
This commit is contained in:
Stephane Nicoll
2018-03-26 17:59:35 +02:00
parent 3b0f6e7168
commit 553b184248
3 changed files with 7 additions and 5 deletions

View File

@@ -56,7 +56,8 @@ public class ClassLoaderFile implements Serializable {
public ClassLoaderFile(Kind kind, long lastModified, byte[] contents) {
Assert.notNull(kind, "Kind must not be null");
Assert.isTrue(kind == Kind.DELETED ? contents == null : contents != null,
() -> "Contents must " + (kind == Kind.DELETED ? "" : "not ") + "be null");
() -> "Contents must " + (kind == Kind.DELETED ? "" : "not ")
+ "be null");
this.kind = kind;
this.lastModified = lastModified;
this.contents = contents;