mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
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) {
|
for (String term : terms) {
|
||||||
if (term != null && term.length() > 0) {
|
if (term != null && term.length() > 0) {
|
||||||
String key = keyFunction.apply(term);
|
String key = keyFunction.apply(term);
|
||||||
if (key != null && key.length() > 0 && !uniqueMap.containsKey(key)) {
|
if (key != null && key.length() > 0) {
|
||||||
uniqueMap.put(key, valueFunction.apply(term));
|
uniqueMap.computeIfAbsent(key, k -> valueFunction.apply(term));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user