From 97561667a09c9949d06c6be11ff8b3f36d44b97c Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 10 Mar 2016 12:36:57 -0700 Subject: [PATCH] Java 7-ize this class --- Essentials/src/com/earth2me/essentials/ItemDb.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java index c3c61842d59..4d061ae16a2 100644 --- a/Essentials/src/com/earth2me/essentials/ItemDb.java +++ b/Essentials/src/com/earth2me/essentials/ItemDb.java @@ -23,10 +23,10 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb { private final transient IEssentials ess; - private final transient Map items = new HashMap(); - private final transient Map> names = new HashMap>(); - private final transient Map primaryName = new HashMap(); - private final transient Map durabilities = new HashMap(); + private final transient Map items = new HashMap<>(); + private final transient Map> names = new HashMap<>(); + private final transient Map primaryName = new HashMap<>(); + private final transient Map durabilities = new HashMap<>(); private final transient ManagedFile file; private final transient Pattern splitPattern = Pattern.compile("((.*)[:+',;.](\\d+))"); @@ -90,7 +90,7 @@ public ItemStack get(final String id, final int quantity) throws Exception { @Override public ItemStack get(final String id) throws Exception { int itemid = 0; - String itemname = null; + String itemname; short metaData = 0; Matcher parts = splitPattern.matcher(id); if (parts.matches()) { @@ -160,7 +160,7 @@ public ItemStack get(final String id) throws Exception { @Override public List getMatching(User user, String[] args) throws Exception { - List is = new ArrayList(); + List is = new ArrayList<>(); if (args.length < 1) { is.add(user.getBase().getItemInHand());