groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [6/8] groovy git commit: Revert "Minor refactoring: Explicit type can be replaced with <>"
Date Sat, 25 Aug 2018 17:03:49 GMT
http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java b/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
index 23c9943..d2ab237 100644
--- a/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
+++ b/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
@@ -220,15 +220,15 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     // The data store and its maximum capacity
     concurrencyLevel = builder.concurrencyLevel;
     capacity = new AtomicLong(Math.min(builder.capacity, MAXIMUM_CAPACITY));
-    data = new ConcurrentHashMap<>(builder.initialCapacity, 0.75f, concurrencyLevel);
+    data = new ConcurrentHashMap<K, Node<K, V>>(builder.initialCapacity, 0.75f, concurrencyLevel);
 
     // The eviction support
     weigher = builder.weigher;
     evictionLock = new ReentrantLock();
     weightedSize = new AtomicLong();
-    evictionDeque = new LinkedDeque<>();
-    writeBuffer = new ConcurrentLinkedQueue<>();
-    drainStatus = new AtomicReference<>(IDLE);
+    evictionDeque = new LinkedDeque<Node<K, V>>();
+    writeBuffer = new ConcurrentLinkedQueue<Runnable>();
+    drainStatus = new AtomicReference<DrainStatus>(IDLE);
 
     readBufferReadCount = new long[NUMBER_OF_READ_BUFFERS];
     readBufferWriteCount = new AtomicLong[NUMBER_OF_READ_BUFFERS];
@@ -239,7 +239,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
       readBufferDrainAtWriteCount[i] = new AtomicLong();
       readBuffers[i] = new AtomicReference[READ_BUFFER_SIZE];
       for (int j = 0; j < READ_BUFFER_SIZE; j++) {
-        readBuffers[i][j] = new AtomicReference<>();
+        readBuffers[i][j] = new AtomicReference<Node<K, V>>();
       }
     }
 
@@ -247,7 +247,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     listener = builder.listener;
     pendingNotifications = (listener == DiscardingListener.INSTANCE)
         ? (Queue<Node<K, V>>) DISCARDING_QUEUE
-        : new ConcurrentLinkedQueue<>();
+        : new ConcurrentLinkedQueue<Node<K, V>>();
   }
 
   /** Ensures that the object is not null. */
@@ -493,7 +493,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
    */
   boolean tryToRetire(Node<K, V> node, WeightedValue<V> expect) {
     if (expect.isAlive()) {
-      final WeightedValue<V> retired = new WeightedValue<>(expect.value, -expect.weight);
+      final WeightedValue<V> retired = new WeightedValue<V>(expect.value, -expect.weight);
       return node.compareAndSet(expect, retired);
     }
     return false;
@@ -511,7 +511,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
       if (!current.isAlive()) {
         return;
       }
-      final WeightedValue<V> retired = new WeightedValue<>(current.value, -current.weight);
+      final WeightedValue<V> retired = new WeightedValue<V>(current.value, -current.weight);
       if (node.compareAndSet(current, retired)) {
         return;
       }
@@ -528,7 +528,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
   void makeDead(Node<K, V> node) {
     for (;;) {
       WeightedValue<V> current = node.get();
-      WeightedValue<V> dead = new WeightedValue<>(current.value, 0);
+      WeightedValue<V> dead = new WeightedValue<V>(current.value, 0);
       if (node.compareAndSet(current, dead)) {
         weightedSize.lazySet(weightedSize.get() - Math.abs(current.weight));
         return;
@@ -720,8 +720,8 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     checkNotNull(value);
 
     final int weight = weigher.weightOf(key, value);
-    final WeightedValue<V> weightedValue = new WeightedValue<>(value, weight);
-    final Node<K, V> node = new Node<>(key, weightedValue);
+    final WeightedValue<V> weightedValue = new WeightedValue<V>(value, weight);
+    final Node<K, V> node = new Node<K, V>(key, weightedValue);
 
     for (;;) {
       final Node<K, V> prior = data.putIfAbsent(node.key, node);
@@ -782,7 +782,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     checkNotNull(key);
     checkNotNull(mappingFunction);
 
-    final ObjectHolder<Node<K, V>> objectHolder = new ObjectHolder<>();
+    final ObjectHolder<Node<K, V>> objectHolder = new ObjectHolder<Node<K, V>>();
 
     for (;;) {
       Function<K, Node<K, V>> f = k -> {
@@ -791,8 +791,8 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
         checkNotNull(value);
 
         final int weight = weigher.weightOf(key, value);
-        final WeightedValue<V> weightedValue = new WeightedValue<>(value, weight);
-        final Node<K, V> node = new Node<>(key, weightedValue);
+        final WeightedValue<V> weightedValue = new WeightedValue<V>(value, weight);
+        final Node<K, V> node = new Node<K, V>(key, weightedValue);
 
         objectHolder.setObject(node);
 
@@ -804,8 +804,8 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
       if (null == node) { // the entry is present
         V value = prior.getValue();
         final int weight = weigher.weightOf(key, value);
-        final WeightedValue<V> weightedValue = new WeightedValue<>(value, weight);
-        node = new Node<>(key, weightedValue);
+        final WeightedValue<V> weightedValue = new WeightedValue<V>(value, weight);
+        node = new Node<K, V>(key, weightedValue);
       } else {
         // the return value of `computeIfAbsent` is different from the one of `putIfAbsent`.
         // if the key is absent in map, the return value of `computeIfAbsent` is the newly computed value, but `putIfAbsent` return null.
@@ -888,7 +888,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     checkNotNull(value);
 
     final int weight = weigher.weightOf(key, value);
-    final WeightedValue<V> weightedValue = new WeightedValue<>(value, weight);
+    final WeightedValue<V> weightedValue = new WeightedValue<V>(value, weight);
 
     final Node<K, V> node = data.get(key);
     if (node == null) {
@@ -918,7 +918,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     checkNotNull(newValue);
 
     final int weight = weigher.weightOf(key, newValue);
-    final WeightedValue<V> newWeightedValue = new WeightedValue<>(newValue, weight);
+    final WeightedValue<V> newWeightedValue = new WeightedValue<V>(newValue, weight);
 
     final Node<K, V> node = data.get(key);
     if (node == null) {
@@ -1028,7 +1028,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
       final int initialCapacity = (weigher == Weighers.entrySingleton())
           ? Math.min(limit, (int) weightedSize())
           : 16;
-      final Set<K> keys = new LinkedHashSet<>(initialCapacity);
+      final Set<K> keys = new LinkedHashSet<K>(initialCapacity);
       final Iterator<Node<K, V>> iterator = ascending
           ? evictionDeque.iterator()
           : evictionDeque.descendingIterator();
@@ -1138,7 +1138,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
       final int initialCapacity = (weigher == Weighers.entrySingleton())
           ? Math.min(limit, (int) weightedSize())
           : 16;
-      final Map<K, V> map = new LinkedHashMap<>(initialCapacity);
+      final Map<K, V> map = new LinkedHashMap<K, V>(initialCapacity);
       final Iterator<Node<K, V>> iterator = ascending
           ? evictionDeque.iterator()
           : evictionDeque.descendingIterator();
@@ -1474,7 +1474,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     }
 
     Object writeReplace() {
-      return new SimpleEntry<>(this);
+      return new SimpleEntry<K, V>(this);
     }
   }
 
@@ -1522,7 +1522,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
   static final long serialVersionUID = 1;
 
   Object writeReplace() {
-    return new SerializationProxy<>(this);
+    return new SerializationProxy<K, V>(this);
   }
 
   private void readObject(ObjectInputStream stream) throws InvalidObjectException {
@@ -1545,7 +1545,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
 
     SerializationProxy(ConcurrentLinkedHashMap<K, V> map) {
       concurrencyLevel = map.concurrencyLevel;
-      data = new HashMap<>(map);
+      data = new HashMap<K, V>(map);
       capacity = map.capacity.get();
       listener = map.listener;
       weigher = map.weigher;
@@ -1667,7 +1667,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     public Builder<K, V> weigher(Weigher<? super V> weigher) {
       this.weigher = (weigher == Weighers.singleton())
           ? Weighers.<K, V>entrySingleton()
-          : new BoundedEntryWeigher<>(Weighers.asEntryWeigher(weigher));
+          : new BoundedEntryWeigher<K, V>(Weighers.asEntryWeigher(weigher));
       return this;
     }
 
@@ -1682,7 +1682,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
     public Builder<K, V> weigher(EntryWeigher<? super K, ? super V> weigher) {
       this.weigher = (weigher == Weighers.entrySingleton())
           ? Weighers.<K, V>entrySingleton()
-          : new BoundedEntryWeigher<>(weigher);
+          : new BoundedEntryWeigher<K, V>(weigher);
       return this;
     }
 
@@ -1694,7 +1694,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
      */
     public ConcurrentLinkedHashMap<K, V> build() {
       checkState(capacity >= 0);
-      return new ConcurrentLinkedHashMap<>(this);
+      return new ConcurrentLinkedHashMap<K, V>(this);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/Weighers.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/Weighers.java b/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/Weighers.java
index 25b0599..6fd9b25 100644
--- a/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/Weighers.java
+++ b/src/main/java/org/apache/groovy/util/concurrentlinkedhashmap/Weighers.java
@@ -48,7 +48,7 @@ public final class Weighers {
       final Weigher<? super V> weigher) {
     return (weigher == singleton())
         ? Weighers.<K, V>entrySingleton()
-        : new EntryWeigherView<>(weigher);
+        : new EntryWeigherView<K, V>(weigher);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/antlr/AntlrParserPlugin.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/AntlrParserPlugin.java b/src/main/java/org/codehaus/groovy/antlr/AntlrParserPlugin.java
index 37a6ca7..9b3981a 100644
--- a/src/main/java/org/codehaus/groovy/antlr/AntlrParserPlugin.java
+++ b/src/main/java/org/codehaus/groovy/antlr/AntlrParserPlugin.java
@@ -297,7 +297,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         if ("html".equals(formatProp)) {
             try {
                 PrintStream out = new PrintStream(new FileOutputStream(sourceUnit.getName() + ".html"));
-                List<VisitorAdapter> v = new ArrayList<>();
+                List<VisitorAdapter> v = new ArrayList<VisitorAdapter>();
                 v.add(new NodeAsHTMLPrinter(out, tokenNames));
                 v.add(new SourcePrinter(out, tokenNames));
                 Visitor visitors = new CompositeVisitor(v);
@@ -393,7 +393,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     //-------------------------------------------------------------------------
 
     protected void packageDef(AST packageDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = packageDef.getFirstChild();
         if (isType(ANNOTATIONS, node)) {
             processAnnotations(annotations, node);
@@ -411,7 +411,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
             output.putNodeMetaData(ImportNode.class, ImportNode.class);
 
             boolean isStatic = importNode.getType() == STATIC_IMPORT;
-            List<AnnotationNode> annotations = new ArrayList<>();
+            List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
 
             AST node = importNode.getFirstChild();
             if (isType(ANNOTATIONS, node)) {
@@ -490,7 +490,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected void annotationDef(AST classDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = classDef.getFirstChild();
         int modifiers = Opcodes.ACC_PUBLIC;
         if (isType(MODIFIERS, node)) {
@@ -539,7 +539,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected void innerInterfaceDef(AST classDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = classDef.getFirstChild();
         int modifiers = Opcodes.ACC_PUBLIC;
         if (isType(MODIFIERS, node)) {
@@ -626,7 +626,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected void innerClassDef(AST classDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
 
         if (isType(TRAIT_DEF, classDef)) {
             annotations.add(new AnnotationNode(ClassHelper.make("groovy.transform.Trait")));
@@ -750,7 +750,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 
     protected void enumDef(AST enumNode) {
         assertNodeType(ENUM_DEF, enumNode);
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
 
         AST node = enumNode.getFirstChild();
         int modifiers = Opcodes.ACC_PUBLIC;
@@ -784,7 +784,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     protected void enumConstantDef(AST node) {
         enumConstantBeingDef = true;
         assertNodeType(ENUM_CONSTANT_DEF, node);
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST element = node.getFirstChild();
         if (isType(ANNOTATIONS, element)) {
             processAnnotations(annotations, element);
@@ -861,7 +861,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 
     protected void methodDef(AST methodDef) {
         MethodNode oldNode = methodNode;
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = methodDef.getFirstChild();
 
         GenericsType[] generics = null;
@@ -911,7 +911,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 
             if (isType(LITERAL_throws, node)) {
                 AST throwsNode = node.getFirstChild();
-                List<ClassNode> exceptionList = new ArrayList<>();
+                List<ClassNode> exceptionList = new ArrayList<ClassNode>();
                 throwsList(throwsNode, exceptionList);
                 exceptions = exceptionList.toArray(exceptions);
                 node = node.getNextSibling();
@@ -973,7 +973,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected void constructorDef(AST constructorDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = constructorDef.getFirstChild();
         int modifiers = Opcodes.ACC_PUBLIC;
         if (isType(MODIFIERS, node)) {
@@ -993,7 +993,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         ClassNode[] exceptions = ClassNode.EMPTY_ARRAY;
         if (isType(LITERAL_throws, node)) {
             AST throwsNode = node.getFirstChild();
-            List<ClassNode> exceptionList = new ArrayList<>();
+            List<ClassNode> exceptionList = new ArrayList<ClassNode>();
             throwsList(throwsNode, exceptionList);
             exceptions = exceptionList.toArray(exceptions);
             node = node.getNextSibling();
@@ -1014,7 +1014,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected void fieldDef(AST fieldDef) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         AST node = fieldDef.getFirstChild();
 
         int modifiers = 0;
@@ -1127,7 +1127,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected ClassNode[] interfaces(AST node) {
-        List<ClassNode> interfaceList = new ArrayList<>();
+        List<ClassNode> interfaceList = new ArrayList<ClassNode>();
         for (AST implementNode = node.getFirstChild(); implementNode != null; implementNode = implementNode.getNextSibling()) {
             interfaceList.add(makeTypeWithArguments(implementNode));
         }
@@ -1147,7 +1147,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
             if (isType(IMPLICIT_PARAMETERS, parametersNode)) return Parameter.EMPTY_ARRAY;
             return null;
         } else {
-            List<Parameter> parameters = new ArrayList<>();
+            List<Parameter> parameters = new ArrayList<Parameter>();
             AST firstParameterNode = null;
             do {
                 firstParam = (firstParameterNode == null);
@@ -1175,7 +1175,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected Parameter parameter(AST paramNode) {
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         boolean variableParameterDef = isType(VARIABLE_PARAMETER_DEF, paramNode);
         AST node = paramNode.getFirstChild();
 
@@ -1489,7 +1489,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
                 AST node = variableNode.getFirstChild();
                 // skip the final modifier if it's present
                 if (isType(MODIFIERS, node)) {
-                    int modifiersMask = modifiers(node, new ArrayList<>(), 0);
+                    int modifiersMask = modifiers(node, new ArrayList<AnnotationNode>(), 0);
                     // only final modifier allowed
                     if ((modifiersMask & ~Opcodes.ACC_FINAL) != 0) {
                         throw new ASTRuntimeException(node, "Only the 'final' modifier is allowed in front of the for loop variable.");
@@ -1555,7 +1555,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     protected Expression declarationExpression(AST variableDef) {
         AST node = variableDef.getFirstChild();
         ClassNode type = null;
-        List<AnnotationNode> annotations = new ArrayList<>();
+        List<AnnotationNode> annotations = new ArrayList<AnnotationNode>();
         int modifiers = 0;
         if (isType(MODIFIERS, node)) {
             // force check of modifier conflicts
@@ -1661,7 +1661,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected Statement caseStatements(AST node, List cases) {
-        List<Expression> expressions = new LinkedList<>();
+        List<Expression> expressions = new LinkedList<Expression>();
         Statement statement = EmptyStatement.INSTANCE;
         Statement defaultStatement = EmptyStatement.INSTANCE;
         AST nextSibling = node;
@@ -1722,7 +1722,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
         AST node = tryNode.getNextSibling();
 
         // let's do the catch nodes
-        List<CatchStatement> catches = new ArrayList<>();
+        List<CatchStatement> catches = new ArrayList<CatchStatement>();
         for (; isType(LITERAL_catch, node); node = node.getNextSibling()) {
             final List<CatchStatement> catchStatements = catchStatement(node);
             catches.addAll(catchStatements);
@@ -1747,7 +1747,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 
     protected List<CatchStatement> catchStatement(AST catchNode) {
         AST node = catchNode.getFirstChild();
-        List<CatchStatement> catches = new LinkedList<>();
+        List<CatchStatement> catches = new LinkedList<CatchStatement>();
         Statement code = statement(node.getNextSibling());
         if (MULTICATCH == node.getType()) {
             AST variableNode = node.getNextSibling();
@@ -2153,7 +2153,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     private ClosureListExpression closureListExpression(AST node) {
         isClosureListExpressionAllowedHere(node);
         AST exprNode = node.getFirstChild();
-        List<Expression> list = new LinkedList<>();
+        List<Expression> list = new LinkedList<Expression>();
         while (exprNode != null) {
             if (isType(EXPR, exprNode)) {
                 Expression expr = expression(exprNode);
@@ -2271,7 +2271,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 */
 
     protected Expression listExpression(AST listNode) {
-        List<Expression> expressions = new ArrayList<>();
+        List<Expression> expressions = new ArrayList<Expression>();
         AST elist = listNode.getFirstChild();
         assertNodeType(ELIST, elist);
 
@@ -2695,7 +2695,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected Expression enumArguments(AST elist) {
-        List<Expression> expressionList = new ArrayList<>();
+        List<Expression> expressionList = new ArrayList<Expression>();
         for (AST node = elist; node != null; node = node.getNextSibling()) {
             Expression expression = expression(node);
             expressionList.add(expression);
@@ -2723,7 +2723,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
                 // let's remove any non-MapEntryExpression instances
                 // such as if the last expression is a ClosureExpression
                 // so let's wrap the named method calls in a Map expression
-                List<Expression> argumentList = new ArrayList<>();
+                List<Expression> argumentList = new ArrayList<Expression>();
                 for (Object next : expressionList) {
                     Expression expression = (Expression) next;
                     if (!(expression instanceof MapEntryExpression)) {
@@ -2755,7 +2755,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     private static void checkDuplicateNamedParams(AST elist, List expressionList) {
         if (expressionList.isEmpty()) return;
 
-        Set<String> namedArgumentNames = new HashSet<>();
+        Set<String> namedArgumentNames = new HashSet<String>();
         for (Object expression : expressionList) {
             MapEntryExpression meExp = (MapEntryExpression) expression;
             if (meExp.getKeyExpression() instanceof ConstantExpression) {
@@ -2786,7 +2786,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
     }
 
     protected Expression expressionList(AST node) {
-        List<Expression> expressionList = new ArrayList<>();
+        List<Expression> expressionList = new ArrayList<Expression>();
         for (AST child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
             expressionList.add(expression(child));
         }
@@ -3028,7 +3028,7 @@ public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, Groovy
 
     private List<GenericsType> getTypeArgumentsList(AST node) {
         assertNodeType(TYPE_ARGUMENTS, node);
-        List<GenericsType> typeArgumentList = new LinkedList<>();
+        List<GenericsType> typeArgumentList = new LinkedList<GenericsType>();
         AST typeArgument = node.getFirstChild();
 
         while (typeArgument != null) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java b/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
index ce14c09..1f0d8b5 100644
--- a/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
+++ b/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
@@ -162,7 +162,7 @@ public class GroovySourceAST extends CommonAST implements Comparable, SourceInfo
     }
 
     public List<GroovySourceAST> childrenOfType(int type) {
-        List<GroovySourceAST> result = new ArrayList<>();
+        List<GroovySourceAST> result = new ArrayList<GroovySourceAST>();
         AST child = this.getFirstChild();
         while (child != null) {
             if (child.getType() == type) { result.add((GroovySourceAST) child); }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/antlr/SourceBuffer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/SourceBuffer.java b/src/main/java/org/codehaus/groovy/antlr/SourceBuffer.java
index 4f7e49a..558370f 100644
--- a/src/main/java/org/codehaus/groovy/antlr/SourceBuffer.java
+++ b/src/main/java/org/codehaus/groovy/antlr/SourceBuffer.java
@@ -32,7 +32,7 @@ public class SourceBuffer {
     private StringBuilder current;
 
     public SourceBuffer() {
-        lines = new ArrayList<>();
+        lines = new ArrayList<StringBuilder>();
         //lines.add(new StringBuilder()); // dummy row for position [0] in the List
 
         current = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java b/src/main/java/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java
index 6d4cfe0..ce2a236 100644
--- a/src/main/java/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java
+++ b/src/main/java/org/codehaus/groovy/antlr/treewalker/SourceCodeTraversal.java
@@ -48,7 +48,7 @@ public class SourceCodeTraversal extends TraversalHelper {
         super.setUp(t);
         
         // gather and sort all unvisited AST nodes
-        unvisitedNodes = new ArrayList<>();
+        unvisitedNodes = new ArrayList<GroovySourceAST>();
         traverse(t);
         Collections.sort(unvisitedNodes);
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java b/src/main/java/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java
index 380fc95..dcae1a8 100644
--- a/src/main/java/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java
+++ b/src/main/java/org/codehaus/groovy/antlr/treewalker/TraversalHelper.java
@@ -36,7 +36,7 @@ public abstract class TraversalHelper implements AntlrASTProcessor {
     private final Visitor v;
 
     public TraversalHelper(Visitor visitor) {
-        this.unvisitedNodes = new ArrayList<>();
+        this.unvisitedNodes = new ArrayList<GroovySourceAST>();
         this.v = visitor;
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/AnnotatedNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/AnnotatedNode.java b/src/main/java/org/codehaus/groovy/ast/AnnotatedNode.java
index 75fc2ba..0992455 100644
--- a/src/main/java/org/codehaus/groovy/ast/AnnotatedNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/AnnotatedNode.java
@@ -44,7 +44,7 @@ public class AnnotatedNode extends ASTNode implements GroovydocHolder<AnnotatedN
     }
 
     public List<AnnotationNode> getAnnotations(ClassNode type) {
-        List<AnnotationNode> ret = new ArrayList<>(annotations.size());
+        List<AnnotationNode> ret = new ArrayList<AnnotationNode>(annotations.size());
         for (AnnotationNode node: annotations) {
             if (type.equals(node.getClassNode())) ret.add(node);
         }
@@ -58,7 +58,7 @@ public class AnnotatedNode extends ASTNode implements GroovydocHolder<AnnotatedN
 
     private void checkInit() {
         if (annotations == Collections.EMPTY_LIST)
-            annotations = new ArrayList<>(3);
+            annotations = new ArrayList<AnnotationNode>(3);
     }
 
     public void addAnnotations(List<AnnotationNode> annotations) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/AnnotationNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/AnnotationNode.java b/src/main/java/org/codehaus/groovy/ast/AnnotationNode.java
index 1bd588f..c493299 100644
--- a/src/main/java/org/codehaus/groovy/ast/AnnotationNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/AnnotationNode.java
@@ -72,7 +72,7 @@ public class AnnotationNode extends ASTNode {
 
     private void assertMembers() {
         if (members == null) {
-             members = new LinkedHashMap<>();
+             members = new LinkedHashMap<String, Expression>();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/ClassHelper.java b/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
index 86c442a..2e034fb 100644
--- a/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
+++ b/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
@@ -141,7 +141,7 @@ public class ClassHelper {
         ClassNode classNode;
         if (classNodeSoftReference == null || (classNode = classNodeSoftReference.get()) == null) {
             classNode = new ClassNode(c);
-            ClassHelperCache.classCache.put(c, new SoftReference<>(classNode));
+            ClassHelperCache.classCache.put(c, new SoftReference<ClassNode>(classNode));
 
             VMPluginFactory.getPlugin().setAdditionalClassInformation(classNode);
         }
@@ -372,7 +372,7 @@ public class ClassHelper {
     }
 
     static class ClassHelperCache {
-        static ManagedConcurrentMap<Class, SoftReference<ClassNode>> classCache = new ManagedConcurrentMap<>(ReferenceBundle.getWeakBundle());
+        static ManagedConcurrentMap<Class, SoftReference<ClassNode>> classCache = new ManagedConcurrentMap<Class, SoftReference<ClassNode>>(ReferenceBundle.getWeakBundle());
     }
 
     public static boolean isSAMType(ClassNode type) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/ClassNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/ClassNode.java b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
index 17e1e07..64d5cff 100644
--- a/src/main/java/org/codehaus/groovy/ast/ClassNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
@@ -119,12 +119,12 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
 
         public void put(Object key, MethodNode value) {
             if (map == null) {
-                 map = new LinkedHashMap<>();
+                 map = new LinkedHashMap<Object, List<MethodNode>>();
             }
             if (map.containsKey(key)) {
                 get(key).add(value);
             } else {
-                List<MethodNode> list = new ArrayList<>(2);
+                List<MethodNode> list = new ArrayList<MethodNode>(2);
                 list.add(value);
                 map.put(key, list);
             }
@@ -365,7 +365,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
         if (redirect!=null) return redirect().getFields();
         lazyClassInit();
         if (fields == null)
-            fields = new LinkedList<>();
+            fields = new LinkedList<FieldNode> ();
         return fields;
     }
 
@@ -412,7 +412,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
      * ClassNode or null if there are no such methods
      */
     public List<MethodNode> getAbstractMethods() {
-        List<MethodNode> result = new ArrayList<>(3);
+        List<MethodNode> result = new ArrayList<MethodNode>(3);
         for (MethodNode method : getDeclaredMethodsMap().values()) {
             if (method.isAbstract()) {
                 result.add(method);
@@ -428,11 +428,11 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
     }
 
     public List<MethodNode> getAllDeclaredMethods() {
-        return new ArrayList<>(getDeclaredMethodsMap().values());
+        return new ArrayList<MethodNode>(getDeclaredMethodsMap().values());
     }
 
     public Set<ClassNode> getAllInterfaces () {
-        Set<ClassNode> res = new LinkedHashSet<>();
+        Set<ClassNode> res = new LinkedHashSet<ClassNode>();
         getAllInterfaces(res);
         return res;
     }
@@ -482,7 +482,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
     public List<PropertyNode> getProperties() {
         final ClassNode r = redirect();
         if (r.properties == null)
-            r.properties = new ArrayList<>();
+            r.properties = new ArrayList<PropertyNode> ();
         return r.properties;
     }
 
@@ -490,7 +490,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
         if (redirect != null) return redirect().getDeclaredConstructors();
         lazyClassInit();
         if (constructors == null)
-            constructors = new ArrayList<>();
+            constructors = new ArrayList<ConstructorNode> ();
         return constructors;
     }
 
@@ -562,7 +562,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
         addField(field);
         final ClassNode r = redirect();
         if (r.properties == null)
-            r.properties = new ArrayList<>();
+            r.properties = new ArrayList<PropertyNode> ();
         r.properties.add(node);
     }
 
@@ -607,7 +607,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
         node.setDeclaringClass(this);
         final ClassNode r = redirect();
         if (r.constructors == null)
-            r.constructors = new ArrayList<>();
+            r.constructors = new ArrayList<ConstructorNode> ();
         r.constructors.add(node);
     }
 
@@ -621,7 +621,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
         node.setDeclaringClass(this);
         ClassNode base = redirect();
         if (base.methodsList.isEmpty()) {
-            base.methodsList = new ArrayList<>();
+            base.methodsList = new ArrayList<MethodNode>();
         }
         base.methodsList.add(node);
         base.methods.put(node.getName(), node);
@@ -819,7 +819,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
 
     public List<Statement> getObjectInitializerStatements() {
         if (objectInitializers == null)
-            objectInitializers = new LinkedList<>();
+            objectInitializers = new LinkedList<Statement> ();
         return objectInitializers;
     }
 
@@ -912,7 +912,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
      * @see #getDeclaredMethods(String)
      */
     public List<MethodNode> getMethods(String name) {
-        List<MethodNode> answer = new ArrayList<>();
+        List<MethodNode> answer = new ArrayList<MethodNode>();
         ClassNode node = this;
         while (node != null) {
             answer.addAll(node.getDeclaredMethods(name));
@@ -1478,7 +1478,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
 
         Set<ASTNode> nodes = getTransformInstances().get(annotation.phase()).get(transform);
         if (nodes == null) {
-            nodes = new LinkedHashSet<>();
+            nodes = new LinkedHashSet<ASTNode>();
             getTransformInstances().get(annotation.phase()).put(transform, nodes);
         }
         nodes.add(node);
@@ -1491,7 +1491,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
     public void renameField(String oldName, String newName) {
         ClassNode r = redirect ();
         if (r.fieldIndex == null)
-            r.fieldIndex = new LinkedHashMap<>();
+            r.fieldIndex = new LinkedHashMap<String,FieldNode> ();
         final Map<String,FieldNode> index = r.fieldIndex;
         index.put(newName, index.remove(oldName));
     }
@@ -1499,7 +1499,7 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
     public void removeField(String oldName) {
         ClassNode r = redirect ();
         if (r.fieldIndex == null)
-            r.fieldIndex = new LinkedHashMap<>();
+            r.fieldIndex = new LinkedHashMap<String,FieldNode> ();
         final Map<String,FieldNode> index = r.fieldIndex;
         r.fields.remove(index.get(oldName));
         index.remove(oldName);
@@ -1518,9 +1518,9 @@ public class ClassNode extends AnnotatedNode implements Opcodes {
 
     private Map<CompilePhase, Map<Class<? extends ASTTransformation>, Set<ASTNode>>> getTransformInstances() {
         if(transformInstances == null){
-            transformInstances = new EnumMap<>(CompilePhase.class);
+            transformInstances = new EnumMap<CompilePhase, Map<Class <? extends ASTTransformation>, Set<ASTNode>>>(CompilePhase.class);
             for (CompilePhase phase : CompilePhase.values()) {
-                transformInstances.put(phase, new LinkedHashMap<>());
+                transformInstances.put(phase, new LinkedHashMap<Class <? extends ASTTransformation>, Set<ASTNode>>());
             }
         }
         return transformInstances;

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
index a633168..a453bb1 100644
--- a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
+++ b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
@@ -43,13 +43,13 @@ import java.util.Map;
  */
 public class CompileUnit implements NodeMetaDataHandler {
 
-    private final List<ModuleNode> modules = new ArrayList<>();
-    private final Map<String, ClassNode> classes = new HashMap<>();
+    private final List<ModuleNode> modules = new ArrayList<ModuleNode>();
+    private final Map<String, ClassNode> classes = new HashMap<String, ClassNode>();
     private final CompilerConfiguration config;
     private final GroovyClassLoader classLoader;
     private final CodeSource codeSource;
-    private final Map<String, ClassNode> classesToCompile = new HashMap<>();
-    private final Map<String, SourceUnit> classNameToSource = new HashMap<>();
+    private final Map<String, ClassNode> classesToCompile = new HashMap<String, ClassNode>();
+    private final Map<String, SourceUnit> classNameToSource = new HashMap<String, SourceUnit>();
     private final Map<String, InnerClassNode> generatedInnerClasses = new HashMap();
     private Map metaDataMap = null;
 
@@ -91,7 +91,7 @@ public class CompileUnit implements NodeMetaDataHandler {
      * @return a list of all the classes in each module in the compilation unit
      */
     public List getClasses() {
-        List<ClassNode> answer = new ArrayList<>();
+        List<ClassNode> answer = new ArrayList<ClassNode>();
         for (ModuleNode module : modules) {
             answer.addAll(module.getClasses());
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/GenericsType.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/GenericsType.java b/src/main/java/org/codehaus/groovy/ast/GenericsType.java
index 75b9ba4..28216e1 100644
--- a/src/main/java/org/codehaus/groovy/ast/GenericsType.java
+++ b/src/main/java/org/codehaus/groovy/ast/GenericsType.java
@@ -68,7 +68,7 @@ public class GenericsType extends ASTNode {
     }
 
     public String toString() {
-        Set<String> visited = new HashSet<>();
+        Set<String> visited = new HashSet<String>();
         return toString(visited);
     }
 
@@ -114,7 +114,7 @@ public class GenericsType extends ASTNode {
             if (Modifier.isStatic(innerClassNode.getModifiers()) || innerClassNode.isInterface()) {
                 ret.append(innerClassNode.getOuterClass().getName());
             } else {
-                ret.append(genericsBounds(innerClassNode.getOuterClass(), new HashSet<>()));
+                ret.append(genericsBounds(innerClassNode.getOuterClass(), new HashSet<String>()));
             }
             ret.append(".");
             String typeName = theType.getName();

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/InnerClassNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/InnerClassNode.java b/src/main/java/org/codehaus/groovy/ast/InnerClassNode.java
index 71cfce7..f20c457 100644
--- a/src/main/java/org/codehaus/groovy/ast/InnerClassNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/InnerClassNode.java
@@ -52,7 +52,7 @@ public class InnerClassNode extends ClassNode {
         this.outerClass = outerClass;
 
         if (outerClass.innerClasses == null)
-            outerClass.innerClasses = new LinkedList<>();
+            outerClass.innerClasses = new LinkedList<InnerClassNode> ();
         outerClass.innerClasses.add(this);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/ModuleNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/ModuleNode.java b/src/main/java/org/codehaus/groovy/ast/ModuleNode.java
index 2049a55..a0f4b52 100644
--- a/src/main/java/org/codehaus/groovy/ast/ModuleNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/ModuleNode.java
@@ -56,12 +56,12 @@ import java.util.Map;
 public class ModuleNode extends ASTNode implements Opcodes {
 
     private final BlockStatement statementBlock = new BlockStatement();
-    List<ClassNode> classes = new LinkedList<>();
-    private final List<MethodNode> methods = new ArrayList<>();
-    private final Map<String, ImportNode> imports = new HashMap<>();
-    private final List<ImportNode> starImports = new ArrayList<>();
-    private final Map<String, ImportNode> staticImports = new LinkedHashMap<>();
-    private final Map<String, ImportNode> staticStarImports = new LinkedHashMap<>();
+    List<ClassNode> classes = new LinkedList<ClassNode>();
+    private final List<MethodNode> methods = new ArrayList<MethodNode>();
+    private final Map<String, ImportNode> imports = new HashMap<String, ImportNode>();
+    private final List<ImportNode> starImports = new ArrayList<ImportNode>();
+    private final Map<String, ImportNode> staticImports = new LinkedHashMap<String, ImportNode>();
+    private final Map<String, ImportNode> staticStarImports = new LinkedHashMap<String, ImportNode>();
     private CompileUnit unit;
     private PackageNode packageNode;
     private String description;
@@ -105,7 +105,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     }
 
     public List<ImportNode> getImports() {
-        return new ArrayList<>(imports.values());
+        return new ArrayList<ImportNode>(imports.values());
     }
 
     public List<ImportNode> getStarImports() {
@@ -130,7 +130,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     }
 
     public void addImport(String alias, ClassNode type) {
-        addImport(alias, type, new ArrayList<>());
+        addImport(alias, type, new ArrayList<AnnotationNode>());
     }
 
     public void addImport(String alias, ClassNode type, List<AnnotationNode> annotations) {
@@ -141,7 +141,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     }
 
     public void addStarImport(String packageName) {
-        addStarImport(packageName, new ArrayList<>());
+        addStarImport(packageName, new ArrayList<AnnotationNode>());
     }
 
     public void addStarImport(String packageName, List<AnnotationNode> annotations) {
@@ -420,7 +420,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     public void sortClasses(){
         if (isEmpty()) return;
         List<ClassNode> classes = getClasses();
-        LinkedList<ClassNode> sorted = new LinkedList<>();
+        LinkedList<ClassNode> sorted = new LinkedList<ClassNode>();
         int level=1;
         while (!classes.isEmpty()) {
             for (Iterator<ClassNode> cni = classes.iterator(); cni.hasNext();) {
@@ -453,7 +453,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     }
 
     public void addStaticImport(ClassNode type, String fieldName, String alias) {
-        addStaticImport(type, fieldName, alias, new ArrayList<>());
+        addStaticImport(type, fieldName, alias, new ArrayList<AnnotationNode>());
     }
 
     public void addStaticImport(ClassNode type, String fieldName, String alias, List<AnnotationNode> annotations) {
@@ -464,7 +464,7 @@ public class ModuleNode extends ASTNode implements Opcodes {
     }
 
     public void addStaticStarImport(String name, ClassNode type) {
-        addStaticStarImport(name, type, new ArrayList<>());
+        addStaticStarImport(name, type, new ArrayList<AnnotationNode>());
     }
 
     public void addStaticStarImport(String name, ClassNode type, List<AnnotationNode> annotations) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/VariableScope.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/VariableScope.java b/src/main/java/org/codehaus/groovy/ast/VariableScope.java
index 9381c64..521b301 100644
--- a/src/main/java/org/codehaus/groovy/ast/VariableScope.java
+++ b/src/main/java/org/codehaus/groovy/ast/VariableScope.java
@@ -99,15 +99,15 @@ public class VariableScope  {
         VariableScope copy = new VariableScope();
         copy.clazzScope = clazzScope;
         if (!declaredVariables.isEmpty()) {
-          copy.declaredVariables = new LinkedHashMap<>(declaredVariables);
+          copy.declaredVariables = new LinkedHashMap<String, Variable>(declaredVariables);
         }
         copy.inStaticContext = inStaticContext;
         copy.parent = parent;
         if (!referencedClassVariables.isEmpty()) {
-            copy.referencedClassVariables = new LinkedHashMap<>(referencedClassVariables);
+            copy.referencedClassVariables = new LinkedHashMap<String, Variable>(referencedClassVariables);
         }
         if (!referencedLocalVariables.isEmpty()) {
-            copy.referencedLocalVariables = new LinkedHashMap<>(referencedLocalVariables);
+            copy.referencedLocalVariables = new LinkedHashMap<String, Variable>(referencedLocalVariables);
         }
         copy.resolvesDynamic = resolvesDynamic;
         return copy;
@@ -115,7 +115,7 @@ public class VariableScope  {
 
     public void putDeclaredVariable(Variable var) {
         if (declaredVariables == Collections.EMPTY_MAP)
-          declaredVariables = new LinkedHashMap<>();
+          declaredVariables = new LinkedHashMap<String, Variable>();
         declaredVariables.put(var.getName(), var);
     }
 
@@ -133,13 +133,13 @@ public class VariableScope  {
 
     public void putReferencedLocalVariable(Variable var) {
         if (referencedLocalVariables == Collections.EMPTY_MAP)
-          referencedLocalVariables = new LinkedHashMap<>();
+          referencedLocalVariables = new LinkedHashMap<String, Variable>();
         referencedLocalVariables.put(var.getName(), var);
     }
 
     public void putReferencedClassVariable(Variable var) {
         if (referencedClassVariables == Collections.EMPTY_MAP)
-          referencedClassVariables = new LinkedHashMap<>();
+          referencedClassVariables = new LinkedHashMap<String, Variable>();
         referencedClassVariables.put(var.getName(), var);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java b/src/main/java/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
index 2773edb..6882498 100644
--- a/src/main/java/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
+++ b/src/main/java/org/codehaus/groovy/ast/builder/AstBuilderTransformation.java
@@ -72,7 +72,7 @@ public class AstBuilderTransformation extends MethodCallTransformation {
      */
     private static class AstBuilderInvocationTrap extends MethodInvocationTrap {
 
-        private final List<String> factoryTargets = new ArrayList<>();
+        private final List<String> factoryTargets = new ArrayList<String>();
 
         /**
          * Creates the trap and captures all the ways in which a class may be referenced via imports.
@@ -124,7 +124,7 @@ public class AstBuilderTransformation extends MethodCallTransformation {
         }
 
         private static List<Expression> getNonClosureArguments(MethodCallExpression call) {
-            List<Expression> result = new ArrayList<>();
+            List<Expression> result = new ArrayList<Expression>();
             if (call.getArguments() instanceof TupleExpression) {
                 for (ASTNode node : ((TupleExpression) call.getArguments()).getExpressions()) {
                     if (!(node instanceof ClosureExpression)) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java b/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
index 3793303..f0bf0bd 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
@@ -55,7 +55,7 @@ public abstract class AsmDecompiler {
          * It's synchronized "just in case". Occasional misses are expected if several threads attempt to load the same class,
          * but this shouldn't result in serious memory issues.
          */
-        static final Map<URI, SoftReference<ClassStub>> map = new ConcurrentHashMap<>();         // According to http://michaelscharf.blogspot.jp/2006/11/javaneturlequals-and-hashcode-make.html, use java.net.URI instead.
+        static final Map<URI, SoftReference<ClassStub>> map = new ConcurrentHashMap<URI, SoftReference<ClassStub>>();         // According to http://michaelscharf.blogspot.jp/2006/11/javaneturlequals-and-hashcode-make.html, use java.net.URI instead.
     }
 
     /**
@@ -83,7 +83,7 @@ public abstract class AsmDecompiler {
                 new ClassReader(stream).accept(visitor, ClassReader.SKIP_FRAMES);
             }
             stub = visitor.result;
-            StubCache.map.put(uri, new SoftReference<>(stub));
+            StubCache.map.put(uri, new SoftReference<ClassStub>(stub));
         }
         return stub;
     }
@@ -131,7 +131,7 @@ public abstract class AsmDecompiler {
         public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
             if (!"<clinit>".equals(name)) {
                 final MethodStub stub = new MethodStub(name, access, desc, signature, exceptions != null ? exceptions : EMPTY_STRING_ARRAY);
-                if (result.methods == null) result.methods = new ArrayList<>(1);
+                if (result.methods == null) result.methods = new ArrayList<MethodStub>(1);
                 result.methods.add(stub);
                 return new MethodVisitor(api) {
                     @Override
@@ -141,10 +141,10 @@ public abstract class AsmDecompiler {
 
                     @Override
                     public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
-                        if (stub.parameterAnnotations == null) stub.parameterAnnotations = new HashMap<>(1);
+                        if (stub.parameterAnnotations == null) stub.parameterAnnotations = new HashMap<Integer, List<AnnotationStub>>(1);
                         List<AnnotationStub> list = stub.parameterAnnotations.get(parameter);
                         if (list == null) {
-                            stub.parameterAnnotations.put(parameter, list = new ArrayList<>());
+                            stub.parameterAnnotations.put(parameter, list = new ArrayList<AnnotationStub>());
                         }
                         AnnotationStub annotationStub = new AnnotationStub(desc);
                         list.add(annotationStub);
@@ -173,7 +173,7 @@ public abstract class AsmDecompiler {
         @Override
         public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
             final FieldStub stub = new FieldStub(name, access, desc, signature);
-            if (result.fields == null) result.fields = new ArrayList<>(1);
+            if (result.fields == null) result.fields = new ArrayList<FieldStub>(1);
             result.fields.add(stub);
             return new FieldVisitor(api) {
                 @Override
@@ -223,7 +223,7 @@ public abstract class AsmDecompiler {
 
         @Override
         public AnnotationVisitor visitArray(String name) {
-            final List<Object> list = new ArrayList<>();
+            final List<Object> list = new ArrayList<Object>();
             visitAttribute(name, list);
             return new AnnotationReader() {
                 @Override

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/decompiled/ClassSignatureParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/ClassSignatureParser.java b/src/main/java/org/codehaus/groovy/ast/decompiled/ClassSignatureParser.java
index bfafcdc..2c0d28c 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/ClassSignatureParser.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/ClassSignatureParser.java
@@ -48,7 +48,7 @@ class ClassSignatureParser {
     }
 
     private static void parseClassSignature(final ClassNode classNode, String signature, final AsmReferenceResolver resolver) {
-        final List<ClassNode> interfaces = new ArrayList<>();
+        final List<ClassNode> interfaces = new ArrayList<ClassNode>();
         FormalParameterParser v = new FormalParameterParser(resolver) {
 
             @Override

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/decompiled/ClassStub.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/ClassStub.java b/src/main/java/org/codehaus/groovy/ast/decompiled/ClassStub.java
index 9d1986c..987753b 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/ClassStub.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/ClassStub.java
@@ -52,7 +52,7 @@ class MemberStub {
 
     AnnotationStub addAnnotation(String desc) {
         AnnotationStub stub = new AnnotationStub(desc);
-        if (annotations == null) annotations = new ArrayList<>(1);
+        if (annotations == null) annotations = new ArrayList<AnnotationStub>(1);
         annotations.add(stub);
         return stub;
     }
@@ -92,7 +92,7 @@ class FieldStub extends MemberStub {
 
 class AnnotationStub {
     final String className;
-    final Map<String, Object> members = new LinkedHashMap<>();
+    final Map<String, Object> members = new LinkedHashMap<String, Object>();
 
     public AnnotationStub(String className) {
         this.className = className;

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/decompiled/FormalParameterParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/FormalParameterParser.java b/src/main/java/org/codehaus/groovy/ast/decompiled/FormalParameterParser.java
index ed2ca0e..0c0603a 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/FormalParameterParser.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/FormalParameterParser.java
@@ -33,8 +33,8 @@ import java.util.List;
 abstract class FormalParameterParser extends SignatureVisitor {
     private final AsmReferenceResolver resolver;
     private String currentTypeParameter;
-    private final List<ClassNode> parameterBounds = new ArrayList<>();
-    private final List<GenericsType> typeParameters = new ArrayList<>();
+    private final List<ClassNode> parameterBounds = new ArrayList<ClassNode>();
+    private final List<GenericsType> typeParameters = new ArrayList<GenericsType>();
 
     public FormalParameterParser(AsmReferenceResolver resolver) {
         super(CompilerConfiguration.ASM_API_VERSION);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/decompiled/TypeSignatureParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/TypeSignatureParser.java b/src/main/java/org/codehaus/groovy/ast/decompiled/TypeSignatureParser.java
index e70686f..21a7e6c 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/TypeSignatureParser.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/TypeSignatureParser.java
@@ -43,7 +43,7 @@ abstract class TypeSignatureParser extends SignatureVisitor {
     abstract void finished(ClassNode result);
 
     private String baseName;
-    private final List<GenericsType> arguments = new ArrayList<>();
+    private final List<GenericsType> arguments = new ArrayList<GenericsType>();
 
     @Override
     public void visitTypeVariable(String name) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/ClosureListExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/ClosureListExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/ClosureListExpression.java
index 20f05e8..ecbd333 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/ClosureListExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/ClosureListExpression.java
@@ -48,7 +48,7 @@ public class ClosureListExpression extends ListExpression {
     }
     
     public ClosureListExpression() {
-        this(new ArrayList<>(3));
+        this(new ArrayList<Expression>(3));
     }
     
     public void visit(GroovyCodeVisitor visitor) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/Expression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/Expression.java b/src/main/java/org/codehaus/groovy/ast/expr/Expression.java
index fbcb9d6..f9991d2 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/Expression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/Expression.java
@@ -46,7 +46,7 @@ public abstract class Expression extends AnnotatedNode {
      * @return a new list of transformed expressions
      */
     protected List<Expression> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer) {
-        List<Expression> list = new ArrayList<>(expressions.size());
+        List<Expression> list = new ArrayList<Expression>(expressions.size());
         for (Expression expr : expressions ) {
             list.add(transformer.transform(expr));
         }
@@ -60,7 +60,7 @@ public abstract class Expression extends AnnotatedNode {
      */
     protected <T extends Expression> List<T> transformExpressions(List<? extends Expression> expressions,
             ExpressionTransformer transformer, Class<T> transformedType) {
-        List<T> list = new ArrayList<>(expressions.size());
+        List<T> list = new ArrayList<T>(expressions.size());
         for (Expression expr : expressions) {
             Expression transformed = transformer.transform(expr);
             if (!transformedType.isInstance(transformed))

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
index 531ef70..7ccf355 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
@@ -39,8 +39,8 @@ public class GStringExpression extends Expression {
     public GStringExpression(String verbatimText) {
         this.verbatimText = verbatimText;
         super.setType(ClassHelper.GSTRING_TYPE);
-        this.strings = new ArrayList<>();
-        this.values = new ArrayList<>();
+        this.strings = new ArrayList<ConstantExpression>();
+        this.values = new ArrayList<Expression>();
     }
 
     public GStringExpression(String verbatimText, List<ConstantExpression> strings, List<Expression> values) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/ListExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/ListExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/ListExpression.java
index 737de2e..94ab0d2 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/ListExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/ListExpression.java
@@ -34,7 +34,7 @@ public class ListExpression extends Expression {
     private boolean wrapped = false;
 
     public ListExpression() {
-        this(new ArrayList<>());
+        this(new ArrayList<Expression>());
     }
 
     public ListExpression(List<Expression> expressions) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/MapExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/MapExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/MapExpression.java
index 38c1764..0effc80 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/MapExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/MapExpression.java
@@ -33,7 +33,7 @@ public class MapExpression extends Expression {
     private final List<MapEntryExpression> mapEntryExpressions;
 
     public MapExpression() {
-        this(new ArrayList<>());
+        this(new ArrayList<MapEntryExpression>());
     }
 
     public MapExpression(List<MapEntryExpression> mapEntryExpressions) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/expr/TupleExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/TupleExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/TupleExpression.java
index 83512fc..113706a 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/TupleExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/TupleExpression.java
@@ -57,7 +57,7 @@ public class TupleExpression extends Expression implements Iterable<Expression>
     }
     
     public TupleExpression(int length) {
-        this.expressions = new ArrayList<>(length);
+        this.expressions = new ArrayList<Expression>(length);
     }
     
     public TupleExpression(List<Expression> expressions) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/stmt/BlockStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/BlockStatement.java b/src/main/java/org/codehaus/groovy/ast/stmt/BlockStatement.java
index a024d58..5013726 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/BlockStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/BlockStatement.java
@@ -32,11 +32,11 @@ import java.util.List;
  */
 public class BlockStatement extends Statement {
 
-    private List<Statement> statements = new ArrayList<>();
+    private List<Statement> statements = new ArrayList<Statement>();
     private VariableScope scope;
     
     public BlockStatement() {
-        this(new ArrayList<>(), new VariableScope());
+        this(new ArrayList<Statement>(), new VariableScope());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/stmt/Statement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/Statement.java b/src/main/java/org/codehaus/groovy/ast/stmt/Statement.java
index 6aa2e57..80dbc4d 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/Statement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/Statement.java
@@ -48,12 +48,12 @@ public class Statement extends ASTNode {
 
     // TODO @Deprecated
     public void setStatementLabel(String label) {
-        if (statementLabels == null) statementLabels = new LinkedList<>();
+        if (statementLabels == null) statementLabels = new LinkedList<String>();
         statementLabels.add(label);
     }
 
     public void addStatementLabel(String label) {
-        if (statementLabels == null) statementLabels = new LinkedList<>();
+        if (statementLabels == null) statementLabels = new LinkedList<String>();
         statementLabels.add(label);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/stmt/SwitchStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/SwitchStatement.java b/src/main/java/org/codehaus/groovy/ast/stmt/SwitchStatement.java
index 6988082..bad0194 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/SwitchStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/SwitchStatement.java
@@ -32,7 +32,7 @@ import java.util.List;
 public class SwitchStatement extends Statement {
 
     private Expression expression;
-    private List<CaseStatement> caseStatements = new ArrayList<>();
+    private List<CaseStatement> caseStatements = new ArrayList<CaseStatement>();
     private Statement defaultStatement;
     
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
index 345783a..aee7176 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
@@ -33,8 +33,8 @@ import java.util.List;
 public class TryCatchStatement extends Statement {
 
     private Statement tryStatement;
-    private List<ExpressionStatement> resourceStatements = new ArrayList<>();
-    private List<CatchStatement> catchStatements = new ArrayList<>();
+    private List<ExpressionStatement> resourceStatements = new ArrayList<ExpressionStatement>();
+    private List<CatchStatement> catchStatements = new ArrayList<CatchStatement>();
     private Statement finallyStatement;
     
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
index a2b3a9d..841e1a3 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
@@ -63,15 +63,15 @@ public class BeanUtils {
      * @return the list of found property nodes
      */
     public static List<PropertyNode> getAllProperties(ClassNode type, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst) {
-        return getAllProperties(type, type, new HashSet<>(), includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst);
+        return getAllProperties(type, type, new HashSet<String>(), includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst);
     }
 
     private static List<PropertyNode> getAllProperties(ClassNode origType, ClassNode type, Set<String> names, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst) {
         // TODO add generics support so this can be used for @EAHC
         if (type == null) {
-            return new ArrayList<>();
+            return new ArrayList<PropertyNode>();
         }
-        List<PropertyNode> result = new ArrayList<>();
+        List<PropertyNode> result = new ArrayList<PropertyNode>();
         if (superFirst && includeSuperProperties) {
             result.addAll(getAllProperties(origType, type.getSuperClass(), names, includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst));
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
index 375e910..d7a3f0c 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
@@ -96,7 +96,7 @@ public class GeneralUtils {
     }
 
     public static ArgumentListExpression args(Expression... expressions) {
-        List<Expression> args = new ArrayList<>();
+        List<Expression> args = new ArrayList<Expression>();
         Collections.addAll(args, expressions);
         return new ArgumentListExpression(args);
     }
@@ -110,7 +110,7 @@ public class GeneralUtils {
     }
 
     public static ArgumentListExpression args(String... names) {
-        List<Expression> vars = new ArrayList<>();
+        List<Expression> vars = new ArrayList<Expression>();
         for (String name : names) {
             vars.add(varX(name));
         }
@@ -357,7 +357,7 @@ public class GeneralUtils {
 
     public static List<MethodNode> getAllMethods(ClassNode type) {
         ClassNode node = type;
-        List<MethodNode> result = new ArrayList<>();
+        List<MethodNode> result = new ArrayList<MethodNode>();
         while (node != null) {
             result.addAll(node.getMethods());
             node = node.getSuperClass();
@@ -367,7 +367,7 @@ public class GeneralUtils {
 
     public static List<PropertyNode> getAllProperties(ClassNode type) {
         ClassNode node = type;
-        List<PropertyNode> result = new ArrayList<>();
+        List<PropertyNode> result = new ArrayList<PropertyNode>();
         while (node != null) {
             result.addAll(node.getProperties());
             node = node.getSuperClass();
@@ -380,7 +380,7 @@ public class GeneralUtils {
     }
 
     public static List<FieldNode> getInstanceNonPropertyFields(ClassNode cNode) {
-        final List<FieldNode> result = new ArrayList<>();
+        final List<FieldNode> result = new ArrayList<FieldNode>();
         for (FieldNode fNode : cNode.getFields()) {
             if (!fNode.isStatic() && cNode.getProperty(fNode.getName()) == null) {
                 result.add(fNode);
@@ -391,7 +391,7 @@ public class GeneralUtils {
 
     public static List<String> getInstanceNonPropertyFieldNames(ClassNode cNode) {
         List<FieldNode> fList = getInstanceNonPropertyFields(cNode);
-        List<String> result = new ArrayList<>(fList.size());
+        List<String> result = new ArrayList<String>(fList.size());
         for (FieldNode fNode : fList) {
             result.add(fNode.getName());
         }
@@ -399,7 +399,7 @@ public class GeneralUtils {
     }
 
     public static List<PropertyNode> getInstanceProperties(ClassNode cNode) {
-        final List<PropertyNode> result = new ArrayList<>();
+        final List<PropertyNode> result = new ArrayList<PropertyNode>();
         for (PropertyNode pNode : cNode.getProperties()) {
             if (!pNode.isStatic()) {
                 result.add(pNode);
@@ -410,7 +410,7 @@ public class GeneralUtils {
 
     public static List<String> getInstancePropertyNames(ClassNode cNode) {
         List<PropertyNode> pList = BeanUtils.getAllProperties(cNode, false, false, true);
-        List<String> result = new ArrayList<>(pList.size());
+        List<String> result = new ArrayList<String>(pList.size());
         for (PropertyNode pNode : pList) {
             result.add(pNode.getName());
         }
@@ -418,7 +418,7 @@ public class GeneralUtils {
     }
 
     public static List<FieldNode> getInstancePropertyFields(ClassNode cNode) {
-        final List<FieldNode> result = new ArrayList<>();
+        final List<FieldNode> result = new ArrayList<FieldNode>();
         for (PropertyNode pNode : cNode.getProperties()) {
             if (!pNode.isStatic()) {
                 result.add(pNode.getField());
@@ -428,7 +428,7 @@ public class GeneralUtils {
     }
 
     public static Set<ClassNode> getInterfacesAndSuperInterfaces(ClassNode type) {
-        Set<ClassNode> res = new LinkedHashSet<>();
+        Set<ClassNode> res = new LinkedHashSet<ClassNode>();
         if (type.isInterface()) {
             res.add(type);
             return res;
@@ -444,7 +444,7 @@ public class GeneralUtils {
     public static List<FieldNode> getSuperNonPropertyFields(ClassNode cNode) {
         final List<FieldNode> result;
         if (cNode == ClassHelper.OBJECT_TYPE) {
-            result = new ArrayList<>();
+            result = new ArrayList<FieldNode>();
         } else {
             result = getSuperNonPropertyFields(cNode.getSuperClass());
         }
@@ -459,7 +459,7 @@ public class GeneralUtils {
     public static List<FieldNode> getSuperPropertyFields(ClassNode cNode) {
         final List<FieldNode> result;
         if (cNode == ClassHelper.OBJECT_TYPE) {
-            result = new ArrayList<>();
+            result = new ArrayList<FieldNode>();
         } else {
             result = getSuperPropertyFields(cNode.getSuperClass());
         }
@@ -482,7 +482,7 @@ public class GeneralUtils {
     public static List<PropertyNode> getAllProperties(Set<String> names, ClassNode origType, ClassNode cNode, boolean includeProperties,
                                                       boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters,
                                                       boolean traverseSuperClasses, boolean skipReadonly, boolean reverse, boolean allNames, boolean includeStatic) {
-        final List<PropertyNode> result = new ArrayList<>();
+        final List<PropertyNode> result = new ArrayList<PropertyNode>();
         if (cNode != ClassHelper.OBJECT_TYPE && traverseSuperClasses && !reverse) {
             result.addAll(getAllProperties(names, origType, cNode.getSuperClass(), includeProperties, includeFields, includePseudoGetters, includePseudoSetters, true, skipReadonly));
         }

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
index 68c7175..c7af72d 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
@@ -142,7 +142,7 @@ public class GenericsUtils {
     }
 
     public static Map<GenericsTypeName, GenericsType> extractPlaceholders(ClassNode cn) {
-        Map<GenericsTypeName, GenericsType> ret = new HashMap<>();
+        Map<GenericsTypeName, GenericsType> ret = new HashMap<GenericsTypeName, GenericsType>();
         extractPlaceholders(cn, ret);
         return ret;
     }
@@ -332,7 +332,7 @@ public class GenericsUtils {
     }
 
     public static ClassNode correctToGenericsSpecRecurse(Map<String, ClassNode> genericsSpec, ClassNode type) {
-        return correctToGenericsSpecRecurse(genericsSpec, type, new ArrayList<>());
+        return correctToGenericsSpecRecurse(genericsSpec, type, new ArrayList<String>());
     }
 
     /**
@@ -343,7 +343,7 @@ public class GenericsUtils {
         ClassNode[] newTypes = new ClassNode[types.length];
         boolean modified = false;
         for (int i = 0; i < types.length; i++) {
-            newTypes[i] = correctToGenericsSpecRecurse(genericsSpec, types[i], new ArrayList<>());
+            newTypes[i] = correctToGenericsSpecRecurse(genericsSpec, types[i], new ArrayList<String>());
             modified = modified || (types[i] != newTypes[i]);
         }
         if (!modified) return types;
@@ -427,7 +427,7 @@ public class GenericsUtils {
     }
 
     public static Map<String, ClassNode> createGenericsSpec(ClassNode current, Map<String, ClassNode> oldSpec) {
-        Map<String, ClassNode> ret = new HashMap<>(oldSpec);
+        Map<String, ClassNode> ret = new HashMap<String, ClassNode>(oldSpec);
         // ret contains the type specs, what we now need is the type spec for the
         // current class. To get that we first apply the type parameters to the
         // current class and then use the type names of the current class to reset
@@ -455,7 +455,7 @@ public class GenericsUtils {
     }
 
     public static Map<String, ClassNode> addMethodGenerics(MethodNode current, Map<String, ClassNode> oldSpec) {
-        Map<String, ClassNode> ret = new HashMap<>(oldSpec);
+        Map<String, ClassNode> ret = new HashMap<String, ClassNode>(oldSpec);
         // ret starts with the original type specs, now add gts for the current method if any
         GenericsType[] sgts = current.getGenericsTypes();
         if (sgts != null) {
@@ -562,7 +562,7 @@ public class GenericsUtils {
         final GroovyRecognizer rn = GroovyRecognizer.make(lexer);
         try {
             rn.classOrInterfaceType(true);
-            final AtomicReference<ClassNode> ref = new AtomicReference<>();
+            final AtomicReference<ClassNode> ref = new AtomicReference<ClassNode>();
             AntlrParserPlugin plugin = new AntlrParserPlugin() {
                 @Override
                 public ModuleNode buildAST(final SourceUnit sourceUnit, final ClassLoader classLoader, final Reduction cst) throws ParserException {

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
index 357abb5..fb1cc72 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
@@ -397,9 +397,9 @@ public class WideningCategories {
             // which are common
             ClassNode[] interfacesFromA = a.getInterfaces();
             ClassNode[] interfacesFromB = b.getInterfaces();
-            Set<ClassNode> common = new HashSet<>();
+            Set<ClassNode> common = new HashSet<ClassNode>();
             Collections.addAll(common, interfacesFromA);
-            Set<ClassNode> fromB = new HashSet<>();
+            Set<ClassNode> fromB = new HashSet<ClassNode>();
             Collections.addAll(fromB, interfacesFromB);
             common.retainAll(fromB);
 
@@ -423,7 +423,7 @@ public class WideningCategories {
             // for a ClassNode. Therefore, even if b doesn't implement
             // interface a, a could "implement" other interfaces that b
             // implements too, so we must create a list of matching interfaces
-            List<ClassNode> matchingInterfaces = new LinkedList<>();
+            List<ClassNode> matchingInterfaces = new LinkedList<ClassNode>();
             extractMostSpecificImplementedInterfaces(b, a, matchingInterfaces);
             if (matchingInterfaces.isEmpty()) {
                 // no interface in common
@@ -449,12 +449,12 @@ public class WideningCategories {
         ClassNode sb = b.getUnresolvedSuperClass();
 
         // extract implemented interfaces before "going up"
-        Set<ClassNode> ifa = new HashSet<>();
+        Set<ClassNode> ifa = new HashSet<ClassNode>();
         extractInterfaces(a, ifa);
-        Set<ClassNode> ifb = new HashSet<>();
+        Set<ClassNode> ifb = new HashSet<ClassNode>();
         extractInterfaces(b, ifb);
-        interfacesImplementedByA = interfacesImplementedByA==null? new LinkedList<>(ifa):interfacesImplementedByA;
-        interfacesImplementedByB = interfacesImplementedByB==null? new LinkedList<>(ifb):interfacesImplementedByB;
+        interfacesImplementedByA = interfacesImplementedByA==null?new LinkedList<ClassNode>(ifa):interfacesImplementedByA;
+        interfacesImplementedByB = interfacesImplementedByB==null?new LinkedList<ClassNode>(ifb):interfacesImplementedByB;
 
         // check if no superclass is defined
         // meaning that we reached the top of the object hierarchy
@@ -486,9 +486,9 @@ public class WideningCategories {
      */
     private static List<ClassNode> keepLowestCommonInterfaces(List<ClassNode> fromA, List<ClassNode> fromB) {
         if (fromA==null||fromB==null) return EMPTY_CLASSNODE_LIST;
-        Set<ClassNode> common = new HashSet<>(fromA);
+        Set<ClassNode> common = new HashSet<ClassNode>(fromA);
         common.retainAll(fromB);
-        List<ClassNode> result = new ArrayList<>(common.size());
+        List<ClassNode> result = new ArrayList<ClassNode>(common.size());
         for (ClassNode classNode : common) {
             addMostSpecificInterface(classNode, result);
         }
@@ -618,7 +618,7 @@ public class WideningCategories {
             compileTimeClassNode = upper.equals(OBJECT_TYPE) && interfaces.length>0?interfaces[0]:upper;
             this.name = name;
             usesGenerics = upper.isUsingGenerics();
-            List<GenericsType[]> genericsTypesList = new LinkedList<>();
+            List<GenericsType[]> genericsTypesList = new LinkedList<GenericsType[]>();
             genericsTypesList.add(upper.getGenericsTypes());
 			for (ClassNode anInterface : interfaces) {
                 usesGenerics |= anInterface.isUsingGenerics();
@@ -630,7 +630,7 @@ public class WideningCategories {
 			}
             setUsingGenerics(usesGenerics);
             if (usesGenerics) {
-                List<GenericsType> asArrayList = new ArrayList<>();
+                List<GenericsType> asArrayList = new ArrayList<GenericsType>();
                 for (GenericsType[] genericsTypes : genericsTypesList) {
                     if (genericsTypes!=null) {
                         Collections.addAll(asArrayList, genericsTypes);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
index dbe3351..35a05fe 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -166,7 +166,7 @@ public class AsmClassGenerator extends ClassGenerator {
     static final MethodCaller createGroovyObjectWrapperMethod = MethodCaller.newStatic(ScriptBytecodeAdapter.class, "createGroovyObjectWrapper");
 
     // exception blocks list
-    private final Map<String,ClassNode> referencedClasses = new HashMap<>();
+    private final Map<String,ClassNode> referencedClasses = new HashMap<String,ClassNode>();
     private boolean passingParams;
 
     public static final boolean CREATE_DEBUG_INFO = true;
@@ -2083,10 +2083,10 @@ public class AsmClassGenerator extends ClassGenerator {
      * @param av the visitor to use
      */
     private void visitAnnotationAttributes(AnnotationNode an, AnnotationVisitor av) {
-        Map<String, Object> constantAttrs = new HashMap<>();
-        Map<String, PropertyExpression> enumAttrs = new HashMap<>();
-        Map<String, Object> atAttrs = new HashMap<>();
-        Map<String, ListExpression> arrayAttrs = new HashMap<>();
+        Map<String, Object> constantAttrs = new HashMap<String, Object>();
+        Map<String, PropertyExpression> enumAttrs = new HashMap<String, PropertyExpression>();
+        Map<String, Object> atAttrs = new HashMap<String, Object>();
+        Map<String, ListExpression> arrayAttrs = new HashMap<String, ListExpression>();
 
         for (String name : an.getMembers().keySet()) {
             Expression expr = an.getMember(name);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
index 9ce323e..7f2d933 100644
--- a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
@@ -131,7 +131,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         if (parent != null) {
             result = parent.getDeclaredMethodsMap();
         } else {
-            result = new HashMap<>();
+            result = new HashMap<String, MethodNode>();
         }
         // add in unimplemented abstract methods from the interfaces
         ClassNodeUtils.addDeclaredMethodsFromInterfaces(node, result);
@@ -224,7 +224,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
         if (!isInterface(modifiers)) {
             for (ClassNode anInterface : GeneralUtils.getInterfacesAndSuperInterfaces(node)) {
                 if (Traits.isTrait(anInterface)) {
-                    LinkedHashSet<ClassNode> selfTypes = new LinkedHashSet<>();
+                    LinkedHashSet<ClassNode> selfTypes = new LinkedHashSet<ClassNode>();
                     for (ClassNode type : Traits.collectSelfTypes(anInterface, selfTypes, true, false)) {
                         if (type.isInterface() && !node.implementsInterface(type)) {
                             addError(getDescription(node)


Mime
View raw message