From cd15b823619473bd4afd3fd02174d8b218b5d318 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 16 Dec 2014 14:40:48 +1100 Subject: [PATCH] Compile chat API with 1.6 --- chat/pom.xml | 15 +++++++++++++++ .../main/java/net/md_5/bungee/api/ChatColor.java | 2 +- .../net/md_5/bungee/api/chat/BaseComponent.java | 2 +- .../md_5/bungee/api/chat/ComponentBuilder.java | 2 +- .../net/md_5/bungee/api/chat/TextComponent.java | 2 +- .../bungee/api/chat/TranslatableComponent.java | 4 ++-- .../net/md_5/bungee/chat/ComponentSerializer.java | 2 +- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/chat/pom.xml b/chat/pom.xml index cbb4a4321..283c87e38 100644 --- a/chat/pom.xml +++ b/chat/pom.xml @@ -26,4 +26,19 @@ compile + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + + + + diff --git a/chat/src/main/java/net/md_5/bungee/api/ChatColor.java b/chat/src/main/java/net/md_5/bungee/api/ChatColor.java index 2de614710..cd88bd470 100644 --- a/chat/src/main/java/net/md_5/bungee/api/ChatColor.java +++ b/chat/src/main/java/net/md_5/bungee/api/ChatColor.java @@ -112,7 +112,7 @@ public enum ChatColor /** * Colour instances keyed by their active character. */ - private static final Map BY_CHAR = new HashMap<>(); + private static final Map BY_CHAR = new HashMap(); /** * The code appended to {@link #COLOR_CHAR} to make usable colour. */ diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java b/chat/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java index 8ce1fb0ff..c941b0214 100644 --- a/chat/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java +++ b/chat/src/main/java/net/md_5/bungee/api/chat/BaseComponent.java @@ -323,7 +323,7 @@ public abstract class BaseComponent { if ( extra == null ) { - extra = new ArrayList<>(); + extra = new ArrayList(); } component.parent = this; extra.add( component ); diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java b/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java index 9c17cebd7..7e4aca0af 100644 --- a/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java +++ b/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java @@ -26,7 +26,7 @@ public class ComponentBuilder { private TextComponent current; - private final List parts = new ArrayList<>(); + private final List parts = new ArrayList(); /** * Creates a ComponentBuilder from the other given ComponentBuilder to clone diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/TextComponent.java b/chat/src/main/java/net/md_5/bungee/api/chat/TextComponent.java index 81a45b116..224a6c8d1 100644 --- a/chat/src/main/java/net/md_5/bungee/api/chat/TextComponent.java +++ b/chat/src/main/java/net/md_5/bungee/api/chat/TextComponent.java @@ -30,7 +30,7 @@ public class TextComponent extends BaseComponent */ public static BaseComponent[] fromLegacyText(String message) { - ArrayList components = new ArrayList<>(); + ArrayList components = new ArrayList(); StringBuilder builder = new StringBuilder(); TextComponent component = new TextComponent(); Matcher matcher = url.matcher( message ); diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/TranslatableComponent.java b/chat/src/main/java/net/md_5/bungee/api/chat/TranslatableComponent.java index 5d244fc66..c00b7fa94 100644 --- a/chat/src/main/java/net/md_5/bungee/api/chat/TranslatableComponent.java +++ b/chat/src/main/java/net/md_5/bungee/api/chat/TranslatableComponent.java @@ -60,7 +60,7 @@ public class TranslatableComponent extends BaseComponent public TranslatableComponent(String translate, Object... with) { setTranslate( translate ); - List temp = new ArrayList<>(); + List temp = new ArrayList(); for ( Object w : with ) { if ( w instanceof String ) @@ -121,7 +121,7 @@ public class TranslatableComponent extends BaseComponent { if ( with == null ) { - with = new ArrayList<>(); + with = new ArrayList(); } component.parent = this; with.add( component ); diff --git a/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java b/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java index b001ef858..5756fc4af 100644 --- a/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java +++ b/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java @@ -23,7 +23,7 @@ public class ComponentSerializer implements JsonDeserializer registerTypeAdapter( TranslatableComponent.class, new TranslatableComponentSerializer() ). create(); - public final static ThreadLocal> serializedComponents = new ThreadLocal<>(); + public final static ThreadLocal> serializedComponents = new ThreadLocal>(); public static BaseComponent[] parse(String json) {