Skip to content

Commit

Permalink
Java 7-ize this class
Browse files Browse the repository at this point in the history
  • Loading branch information
vemacs committed Mar 10, 2016
1 parent bdb8112 commit 9756166
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Essentials/src/com/earth2me/essentials/ItemDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

public class ItemDb implements IConf, net.ess3.api.IItemDb {
private final transient IEssentials ess;
private final transient Map<String, Integer> items = new HashMap<String, Integer>();
private final transient Map<ItemData, List<String>> names = new HashMap<ItemData, List<String>>();
private final transient Map<ItemData, String> primaryName = new HashMap<ItemData, String>();
private final transient Map<String, Short> durabilities = new HashMap<String, Short>();
private final transient Map<String, Integer> items = new HashMap<>();
private final transient Map<ItemData, List<String>> names = new HashMap<>();
private final transient Map<ItemData, String> primaryName = new HashMap<>();
private final transient Map<String, Short> durabilities = new HashMap<>();
private final transient ManagedFile file;
private final transient Pattern splitPattern = Pattern.compile("((.*)[:+',;.](\\d+))");

Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -160,7 +160,7 @@ public ItemStack get(final String id) throws Exception {

@Override
public List<ItemStack> getMatching(User user, String[] args) throws Exception {
List<ItemStack> is = new ArrayList<ItemStack>();
List<ItemStack> is = new ArrayList<>();

if (args.length < 1) {
is.add(user.getBase().getItemInHand());
Expand Down

0 comments on commit 9756166

Please sign in to comment.