X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FImageImpl.java;h=9446cec0faf34c6758111bfeb22ad4fe5af064a3;hb=e1507b16a50ac9b8b497e7d151b2889c1736ee9c;hp=b357b6af02f40a5347478dc93370dcd9ab019f1e;hpb=8c46c562753c6cff5510f2d628b5adc4f315ffa2;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java index b357b6a..9446cec 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java @@ -1,5 +1,5 @@ /* - * Sone - ImageImpl.java - Copyright © 2011–2019 David Roden + * Sone - ImageImpl.java - Copyright © 2011–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,7 +95,7 @@ public class ImageImpl implements Image { @Override public Image setAlbum(Album album) { checkNotNull(album, "album must not be null"); - checkNotNull(album.getSone().equals(getSone()), "album must belong to the same Sone as this image"); + checkState(album.getSone().equals(getSone()), "album must belong to the same Sone as this image"); this.album = album; return this; }