Skip to content

Commit

Permalink
Fix default flags NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
boy0001 committed Aug 17, 2016
1 parent f651607 commit 3558105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public static Map<Flag<?>, Object> parseFlags(List<String> flagStrings) {
} else {
split = key.split(":");
}
Flag<?> flag = getFlag(split[0]);
Flag<?> flag = getOrCreateFlag(split[0]);
Object value = flag.parseValue(split[1]);
map.put(flag, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ public static Collection<Flag<?>> getFlags() {
}

public static Flag<?> getFlag(String flag) {
return flags.get(flag);
}
return flags.get(flag);
}

public static void registerFlag(final Flag<?> flag) {
final Flag<?> duplicate = flags.put(flag.getName(), flag);
Expand Down

0 comments on commit 3558105

Please sign in to comment.