From: David ‘Bombe’ Roden Date: Thu, 10 Oct 2013 19:31:08 +0000 (+0200) Subject: Don’t check for the presence of the album image in the album. X-Git-Tag: 0.8.8^2~12 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=32829fc3533dd94ebc1c5fe025caaa3b620886d5;p=Sone.git Don’t check for the presence of the album image in the album. As the albums are loaded and instantiated before the images are loaded, this will inevitably fail during loading. --- diff --git a/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java b/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java index 93cf2d9..5422812 100644 --- a/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java @@ -311,7 +311,7 @@ public class AlbumImpl implements Album { @Override public Album update() throws IllegalStateException { - checkState(!albumImage.isPresent() || images.containsKey(albumImage.get()), "album image must belong to this album"); + checkState(!albumImage.isPresent(), "album image must belong to this album"); if (title.isPresent()) { AlbumImpl.this.title = title.get(); }