@Override
public Album update() throws IllegalStateException {
+ if (title.isPresent() && title.get().trim().isEmpty()) {
+ throw new AlbumTitleMustNotBeEmpty();
+ }
if (title.isPresent()) {
AlbumImpl.this.title = title.get();
}
};
}
+ public static class AlbumTitleMustNotBeEmpty extends IllegalStateException { }
+
//
// FINGERPRINTABLE METHODS
//