Check language in Artwork.matches() as well

This commit is contained in:
Reinhard Pointner 2016-04-19 10:44:55 +00:00
parent 260f93e671
commit ecf7232f00
1 changed files with 3 additions and 3 deletions

View File

@ -53,9 +53,9 @@ public class Artwork implements Serializable {
return rating;
}
public boolean matches(String... tags) {
return stream(tags).filter(Objects::nonNull).allMatch(tag -> {
return stream(tags).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language);
public boolean matches(Object... tags) {
return stream(tags).filter(Objects::nonNull).map(Object::toString).allMatch(tag -> {
return stream(this.tags).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language);
});
}