From 32829fc3533dd94ebc1c5fe025caaa3b620886d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 10 Oct 2013 21:31:08 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20check=20for=20the=20presence=20o?= =?utf8?q?f=20the=20album=20image=20in=20the=20album.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As the albums are loaded and instantiated before the images are loaded, this will inevitably fail during loading. --- src/main/java/net/pterodactylus/sone/data/AlbumImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.7.4