Commit df398272 authored by Steinberg, Jan's avatar Steinberg, Jan
Browse files

check is more readable now. contains vs. indexOf

parent f48a2537
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {