This commit is contained in:
Dominique Eifländer 2021-10-15 09:34:54 +02:00
parent bd7be1df8d
commit 58ab8b76a4
2 changed files with 6 additions and 4 deletions

View File

@ -65,13 +65,13 @@ public class Dictionary {
public boolean containsValue(String type, String value) { public boolean containsValue(String type, String value) {
return localAccessMap.containsKey(type) && localAccessMap.get(type) return localAccessMap.containsKey(type) && localAccessMap.get(type)
.getEntries().stream().map(DictionaryEntry::getValue).collect(toSet()) .getValues(false)
.contains(value) || localAccessMap.containsKey(type) && localAccessMap.get(type) .contains(value) || localAccessMap.containsKey(type) && localAccessMap.get(type)
.getLocalEntries() .getValues(true)
.contains(value) || localAccessMap.containsKey(RECOMMENDATION_PREFIX + type) && localAccessMap.get(RECOMMENDATION_PREFIX + type) .contains(value) || localAccessMap.containsKey(RECOMMENDATION_PREFIX + type) && localAccessMap.get(RECOMMENDATION_PREFIX + type)
.getEntries().stream().map(DictionaryEntry::getValue).collect(toSet()) .getValues(false)
.contains(value) || localAccessMap.containsKey(RECOMMENDATION_PREFIX + type) && localAccessMap.get(RECOMMENDATION_PREFIX + type) .contains(value) || localAccessMap.containsKey(RECOMMENDATION_PREFIX + type) && localAccessMap.get(RECOMMENDATION_PREFIX + type)
.getLocalEntries() .getValues(true)
.contains(value); .contains(value);
} }

View File

@ -604,9 +604,11 @@ public class Section {
if (match.length() >= 3) { if (match.length() >= 3) {
localDictionaryAdds.computeIfAbsent(RECOMMENDATION_PREFIX + type, (x) -> new HashSet<>()) localDictionaryAdds.computeIfAbsent(RECOMMENDATION_PREFIX + type, (x) -> new HashSet<>())
.add(match); .add(match);
log.info("Added match {} to dictionary {}", match, RECOMMENDATION_PREFIX + type);
String lastname = match.split(" ")[0]; String lastname = match.split(" ")[0];
localDictionaryAdds.computeIfAbsent(RECOMMENDATION_PREFIX + type, (x) -> new HashSet<>()) localDictionaryAdds.computeIfAbsent(RECOMMENDATION_PREFIX + type, (x) -> new HashSet<>())
.add(lastname); .add(lastname);
log.info("Added lastname {} to dictionary {}", lastname, RECOMMENDATION_PREFIX + type);
} }
} }
} }