projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add function that returns all images for a Sone.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
AlbumImpl.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java
b/src/main/java/net/pterodactylus/sone/data/AlbumImpl.java
index
b60e99e
..
bb32d75
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/AlbumImpl.java
+++ b/
src/main/java/net/pterodactylus/sone/data/AlbumImpl.java
@@
-303,6
+303,9
@@
public class AlbumImpl implements Album {
@Override
public Album update() throws IllegalStateException {
@Override
public Album update() throws IllegalStateException {
+ if (title.isPresent() && title.get().trim().isEmpty()) {
+ throw new AlbumTitleMustNotBeEmpty();
+ }
if (title.isPresent()) {
AlbumImpl.this.title = title.get();
}
if (title.isPresent()) {
AlbumImpl.this.title = title.get();
}
@@
-317,6
+320,8
@@
public class AlbumImpl implements Album {
};
}
};
}
+ public static class AlbumTitleMustNotBeEmpty extends IllegalStateException { }
+
//
// FINGERPRINTABLE METHODS
//
//
// FINGERPRINTABLE METHODS
//