Java 7 and 8 cleanup

Diamond operator <>
Lambdas and method references
This commit is contained in:
Tom Elfring committed 2017-08-05 17:50:38 +02:00
1 parent 3db03edbc9
commit b72d6efab3
234 files changed
+1614 -2253

No files matched your search

@@ -14,7 +14,7 @@ import org.apache.commons.lang3.text.WordUtils;
public final class ItemRegistryUtils
{
private static final Map<String, String> modIDMap = new HashMap<String, String>();
private static final Map<String, String> modIDMap = new HashMap<>();
private static void populateMap()
{
@@ -46,14 +46,8 @@ public final class ItemRegistryUtils
String modId = itemResourceLocation.getResourceDomain();
String lowercaseModId = modId.toLowerCase(Locale.ENGLISH);
String modName = modIDMap.get(lowercaseModId);
if(modName == null)
{
modName = WordUtils.capitalize(modId);
modIDMap.put(lowercaseModId, modName);
}
String modName = modIDMap.computeIfAbsent(lowercaseModId, k -> WordUtils.capitalize(modId));
return modName;
}
}