Fix potential NPE
@see https://www.filebot.net/forums/viewtopic.php?f=6&t=4234&p=23851#p23851
This commit is contained in:
parent
23542c58c5
commit
32a1d60e7b
|
@ -969,8 +969,8 @@ public class MediaDetection {
|
|||
for (String term : terms) {
|
||||
if (term != null && term.length() > 0) {
|
||||
String key = keyFunction.apply(term);
|
||||
if (key != null && key.length() > 0 && !uniqueMap.containsKey(key)) {
|
||||
uniqueMap.put(key, valueFunction.apply(term));
|
||||
if (key != null && key.length() > 0) {
|
||||
uniqueMap.computeIfAbsent(key, k -> valueFunction.apply(term));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue