As the albums are loaded and instantiated before the images are loaded,
this will inevitably fail during loading.
@Override
public Album update() throws IllegalStateException {
@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();
}
if (title.isPresent()) {
AlbumImpl.this.title = title.get();
}