X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FImage.java;h=04eb34932b3837e98c2fe6195444c8674a7c2727;hb=39ed514e96c15e07aba9478d3cbf304e5f1fda8f;hp=151f25245798ed064de11eb50e2833d25d552e54;hpb=ef0b87acd0c1829b20cd8b0a5f5293948e3a4e1d;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Image.java b/src/main/java/net/pterodactylus/sone/data/Image.java index 151f252..04eb349 100644 --- a/src/main/java/net/pterodactylus/sone/data/Image.java +++ b/src/main/java/net/pterodactylus/sone/data/Image.java @@ -128,7 +128,7 @@ public class Image implements Fingerprintable { * @return This image */ public Image setAlbum(Album album) { - Validation.begin().isNotNull("New Album", album).isEither("Old Album", this.album, null, album).check().isEqual("Album Owner and Image Owner", album.getSone(), getSone()).check(); + Validation.begin().isNotNull("New Album", album).check().isEqual("Album Owner and Image Owner", album.getSone(), getSone()).check(); this.album = album; return this; } @@ -187,7 +187,7 @@ public class Image implements Fingerprintable { * @return This image */ public Image setCreationTime(long creationTime) { - Validation.begin().isGreater("New Image Creation Time", creationTime, 0).isEither("Old Image Creation Time", this.creationTime, new long[] { 0, creationTime }).check(); + Validation.begin().isGreater("New Image Creation Time", creationTime, 0).isEither("Old Image Creation Time", this.creationTime, 0L, creationTime).check(); this.creationTime = creationTime; return this; } @@ -210,7 +210,7 @@ public class Image implements Fingerprintable { * @return This image */ public Image setWidth(int width) { - Validation.begin().isGreater("New Image Width", width, 0).isEither("Old Image Width", this.width, new long[] { 0, width }).check(); + Validation.begin().isGreater("New Image Width", width, 0).isEither("Old Image Width", this.width, 0, width).check(); this.width = width; return this; } @@ -233,7 +233,7 @@ public class Image implements Fingerprintable { * @return This image */ public Image setHeight(int height) { - Validation.begin().isGreater("New Image Height", height, 0).isEither("Old Image Height", this.height, new long[] { 0, height }).check(); + Validation.begin().isGreater("New Image Height", height, 0).isEither("Old Image Height", this.height, 0, height).check(); this.height = height; return this; }