Dealing with a possible null pointer dereference

This commit is contained in:
viniciusbds 2019-10-18 00:23:26 -03:00
parent 5d89978000
commit 790fc2ffaa

View File

@ -81,11 +81,13 @@ public class SetProjectTagsCommand extends Command {
tag = tag.trim();
if (!tag.isEmpty()) {
if (allProjectTags!= null && allProjectTags.containsKey(tag)) {
if (allProjectTags!= null) {
if (allProjectTags.containsKey(tag)) {
allProjectTags.put(tag, allProjectTags.get(tag) + 1);
} else {
allProjectTags.put(tag, 1);
}
}
polishedTags.add(tag);
}
}