mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
Java 7 and 8 cleanup
Diamond operator <> Lambdas and method references
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user