cleanup: use implicit generic type with diamond operator
This commit is contained in:
@@ -81,7 +81,7 @@ public final class Channel {
|
||||
private Map<MapleExpeditionType, MapleExpedition> expeditions = new HashMap<>();
|
||||
private Map<Integer, MapleMiniDungeon> dungeons = new HashMap<>();
|
||||
private List<MapleExpeditionType> expedType = new ArrayList<>();
|
||||
private Set<MapleMap> ownedMaps = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<MapleMap, Boolean>()));
|
||||
private Set<MapleMap> ownedMaps = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>()));
|
||||
private MapleEvent event;
|
||||
private boolean finishedShutdown = false;
|
||||
private Set<Integer> usedMC = new HashSet<>();
|
||||
@@ -456,7 +456,7 @@ public final class Channel {
|
||||
}
|
||||
|
||||
private static String [] getEvents(){
|
||||
List<String> events = new ArrayList<String>();
|
||||
List<String> events = new ArrayList<>();
|
||||
for (File file : new File("scripts/event").listFiles()){
|
||||
events.add(file.getName().substring(0, file.getName().length() - 3));
|
||||
}
|
||||
|
||||
@@ -190,8 +190,8 @@ public final class CouponCodeHandler extends AbstractMaplePacketHandler {
|
||||
if (type < 0) {
|
||||
c.announce(MaplePacketCreator.showCashShopMessage((byte) parseCouponResult(type)));
|
||||
} else {
|
||||
List<Item> cashItems = new LinkedList<Item>();
|
||||
List<Pair<Integer, Integer>> items = new LinkedList<Pair<Integer, Integer>>();
|
||||
List<Item> cashItems = new LinkedList<>();
|
||||
List<Pair<Integer, Integer>> items = new LinkedList<>();
|
||||
int nxCredit = 0;
|
||||
int maplePoints = 0;
|
||||
int nxPrepaid = 0;
|
||||
@@ -245,7 +245,7 @@ public final class CouponCodeHandler extends AbstractMaplePacketHandler {
|
||||
cashItems.add(it);
|
||||
} else {
|
||||
MapleInventoryManipulator.addById(c, item, qty, "", -1);
|
||||
items.add(new Pair<Integer, Integer>((int)qty, item));
|
||||
items.add(new Pair<>((int) qty, item));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user