Simplify conditionals
See gh-39259
This commit is contained in:
committed by
Phillip Webb
parent
def7523398
commit
65a1ff84e6
@@ -55,7 +55,7 @@ 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,
|
||||
Assert.isTrue((kind != Kind.DELETED) == (contents != null),
|
||||
() -> "Contents must " + ((kind != Kind.DELETED) ? "not " : "") + "be null");
|
||||
this.kind = kind;
|
||||
this.lastModified = lastModified;
|
||||
|
||||
Reference in New Issue
Block a user