Commit df398272 by Steinberg, Jan

check is more readable now. contains vs. indexOf

parent f48a2537
......@@ -42,7 +42,7 @@ public class Doabooks2SsoarBundleFilter implements BundleFilter {
&& null != licence) {
LOG.debug("clasShort-Set not null and a licence entry is found");
if (clasShorts.stream().filter(cls -> Arrays.asList(valuesToBeFilteredTo).contains(cls.getValue())).count() > 0) {
if (Arrays.asList(licenceStringsToBeFilteredTo).stream().anyMatch( str -> licence.getValue().indexOf(str) != -1)) {
if (Arrays.asList(licenceStringsToBeFilteredTo).stream().anyMatch( str -> licence.getValue().contains(str))) {
result = true;
LOG.debug("We take it: {}", clasShorts.stream().map(Metadatum::getValue).collect(Collectors.joining("; ")));
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment