Fix NPE
This commit is contained in:
parent
042c380410
commit
df79418064
|
@ -54,6 +54,10 @@ public class Artwork implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(Object... tags) {
|
public boolean matches(Object... tags) {
|
||||||
|
if (tags == null || tags.length == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return stream(tags).filter(Objects::nonNull).map(Object::toString).allMatch(tag -> {
|
return stream(tags).filter(Objects::nonNull).map(Object::toString).allMatch(tag -> {
|
||||||
return stream(this.tags).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language);
|
return stream(this.tags).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue