Fix first call to ToolType.get always returning null (#5396)

This commit is contained in:
mariaum authored and tterrag committed 2019-01-25 22:40:03 -05:00
1 parent 4db208332e
commit 2e1456517a
1 file changed
+1 -1
@@ -38,7 +38,7 @@ public final class ToolType
{
if (VALID_NAME.matcher(name).find())
throw new IllegalArgumentException("ToolType.create() called with invalid name: " + name);
return values.putIfAbsent(name, new ToolType(name));
return values.computeIfAbsent(name, k -> new ToolType(name));
}
private final String name;