From 6c4cfd337e9cbc5a7bfb4bc1d487eafaf4306010 Mon Sep 17 00:00:00 2001 From: gravitylow Date: Tue, 15 Apr 2014 15:19:00 -0400 Subject: [PATCH] Java 6 compatible --- pom.xml | 4 ++-- src/main/java/com/massivecraft/factions/Board.java | 2 +- .../java/com/massivecraft/factions/Faction.java | 14 +++++++------- .../factions/zcore/persist/EntityCollection.java | 4 ++-- .../factions/zcore/util/UUIDFetcher.java | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index b327847c..3186caa2 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ maven-compiler-plugin 2.3.2 - 1.7 - 1.7 + 1.6 + 1.6 diff --git a/src/main/java/com/massivecraft/factions/Board.java b/src/main/java/com/massivecraft/factions/Board.java index 1b42ce2b..f78e3cae 100644 --- a/src/main/java/com/massivecraft/factions/Board.java +++ b/src/main/java/com/massivecraft/factions/Board.java @@ -233,7 +233,7 @@ public class Board { // -------------------------------------------- // public static Map> dumpAsSaveFormat() { - Map> worldCoordIds = new HashMap<>(); + Map> worldCoordIds = new HashMap>(); String worldName, coords; String id; diff --git a/src/main/java/com/massivecraft/factions/Faction.java b/src/main/java/com/massivecraft/factions/Faction.java index 4d4a97ff..a3c681c1 100644 --- a/src/main/java/com/massivecraft/factions/Faction.java +++ b/src/main/java/com/massivecraft/factions/Faction.java @@ -24,11 +24,11 @@ public class Faction extends Entity implements EconomyParticipator { private Map relationWish; // FIELD: claimOwnership - private Map> claimOwnership = new ConcurrentHashMap<>(); + private Map> claimOwnership = new ConcurrentHashMap>(); // FIELD: fplayers // speedy lookup of players in faction - private transient Set fplayers = new HashSet<>(); + private transient Set fplayers = new HashSet(); // FIELD: invites // Where string is a lowercase player name @@ -217,7 +217,7 @@ public class Faction extends Entity implements EconomyParticipator { // -------------------------------------------- // public Faction() { - this.relationWish = new HashMap<>(); + this.relationWish = new HashMap(); this.invites = new HashSet(); this.open = Conf.newFactionsDefaultOpen; this.tag = "???"; @@ -395,12 +395,12 @@ public class Faction extends Entity implements EconomyParticipator { public Set getFPlayers() { // return a shallow copy of the FPlayer list, to prevent tampering and concurrency issues - Set ret = new HashSet<>(fplayers); + Set ret = new HashSet(fplayers); return ret; } public Set getFPlayersWhereOnline(boolean online) { - Set ret = new HashSet<>(); + Set ret = new HashSet(); for (FPlayer fplayer : fplayers) { if (fplayer.isOnline() == online) { @@ -423,7 +423,7 @@ public class Faction extends Entity implements EconomyParticipator { } public ArrayList getFPlayersWhereRole(Role role) { - ArrayList ret = new ArrayList<>(); + ArrayList ret = new ArrayList(); if (!this.isNormal()) return ret; for (FPlayer fplayer : fplayers) { @@ -436,7 +436,7 @@ public class Faction extends Entity implements EconomyParticipator { } public ArrayList getOnlinePlayers() { - ArrayList ret = new ArrayList<>(); + ArrayList ret = new ArrayList(); if (this.isPlayerFreeType()) return ret; for (Player player : P.p.getServer().getOnlinePlayers()) { diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java b/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java index 46ff0023..ab935ed1 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java @@ -184,7 +184,7 @@ public abstract class EntityCollection { if (saveIsRunning) return true; saveIsRunning = true; - Map entitiesThatShouldBeSaved = new HashMap<>(); + Map entitiesThatShouldBeSaved = new HashMap(); for (E entity : this.entities) { if (entity.shouldBeSaved()) { entitiesThatShouldBeSaved.put(entity.getId(), entity); @@ -212,7 +212,7 @@ public abstract class EntityCollection { private Map loadCore() { if (!this.file.exists()) { - return new HashMap<>(); + return new HashMap(); } String content = DiscUtil.readCatch(this.file); diff --git a/src/main/java/com/massivecraft/factions/zcore/util/UUIDFetcher.java b/src/main/java/com/massivecraft/factions/zcore/util/UUIDFetcher.java index 79fae04b..37bd02f0 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/UUIDFetcher.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/UUIDFetcher.java @@ -82,4 +82,4 @@ public class UUIDFetcher implements Callable> { } return JSONValue.toJSONString(lookups); } -} \ No newline at end of file +}