kopia lustrzana https://github.com/JOSM/MapWithAI
Fix potential NPE issue
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head v0.3.2
rodzic
23deedaffb
commit
2ad187a374
|
@ -163,8 +163,9 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
|||
|
||||
public Collection<String> getSourceTags() {
|
||||
return sources.entrySet().parallelStream()
|
||||
.filter(entry -> !editable.getPrimitiveById(entry.getKey()).isDeleted()).map(Entry::getValue)
|
||||
.filter(Objects::nonNull).distinct().sorted().collect(Collectors.toList());
|
||||
.filter(entry -> editable.getPrimitiveById(entry.getKey()) != null
|
||||
&& !editable.getPrimitiveById(entry.getKey()).isDeleted())
|
||||
.map(Entry::getValue).filter(Objects::nonNull).distinct().sorted().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Ładowanie…
Reference in New Issue