Fix default flags NPE

This commit is contained in:
Jesse Boyd 2016-08-17 15:08:01 +10:00
parent f651607d2f
commit 3558105789
2 changed files with 3 additions and 3 deletions

View File

@ -346,7 +346,7 @@ public class FlagManager {
} else {
split = key.split(":");
}
Flag<?> flag = getFlag(split[0]);
Flag<?> flag = getOrCreateFlag(split[0]);
Object value = flag.parseValue(split[1]);
map.put(flag, value);
}

View File

@ -149,8 +149,8 @@ public final class Flags {
}
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);