groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [1/8] groovy git commit: Revert "Minor refactoring: Explicit type can be replaced with <>"
Date Sat, 25 Aug 2018 17:03:44 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 72fd40785 -> 6ef32353d


http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/util/ManagedConcurrentMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/util/ManagedConcurrentMap.java b/src/main/java/org/codehaus/groovy/util/ManagedConcurrentMap.java
index 97e41ba..d1cf760 100644
--- a/src/main/java/org/codehaus/groovy/util/ManagedConcurrentMap.java
+++ b/src/main/java/org/codehaus/groovy/util/ManagedConcurrentMap.java
@@ -29,7 +29,7 @@ public class ManagedConcurrentMap<K,V> extends AbstractConcurrentMap<K,V>
{
     protected Segment<K,V> createSegment(Object segmentInfo, int cap) {
         ReferenceBundle bundle = (ReferenceBundle) segmentInfo;
         if (bundle==null) throw new IllegalArgumentException("bundle must not be null");
-        return new ManagedConcurrentMap.Segment<>(bundle, cap);
+        return new ManagedConcurrentMap.Segment<K,V>(bundle, cap);
     }
 
     public static class Segment<K,V> extends AbstractConcurrentMap.Segment<K,V>{
@@ -44,7 +44,7 @@ public class ManagedConcurrentMap<K,V> extends AbstractConcurrentMap<K,V>
{
 
         protected AbstractConcurrentMap.Entry<K,V> createEntry(K key, int hash, V value)
{
             if (bundle==null) throw new IllegalArgumentException("bundle must not be null");
-            return new EntryWithValue<>(bundle, this, key, hash, value);
+            return new EntryWithValue<K,V>(bundle, this, key, hash, value);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/util/ManagedConcurrentValueMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/util/ManagedConcurrentValueMap.java b/src/main/java/org/codehaus/groovy/util/ManagedConcurrentValueMap.java
index c8c05fb..f28ee68 100644
--- a/src/main/java/org/codehaus/groovy/util/ManagedConcurrentValueMap.java
+++ b/src/main/java/org/codehaus/groovy/util/ManagedConcurrentValueMap.java
@@ -35,7 +35,7 @@ public class ManagedConcurrentValueMap<K,V> {
     private ReferenceBundle bundle;
     public ManagedConcurrentValueMap(ReferenceBundle bundle){
         this.bundle = bundle;
-        internalMap = new ConcurrentHashMap<>();
+        internalMap = new ConcurrentHashMap<K, ManagedReference<V>>();
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java b/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
index ff1e42e..17fa266 100644
--- a/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
+++ b/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
@@ -101,7 +101,7 @@ public class ManagedLinkedList<T> {
      * @param value the value
      */
     public void add(T value) {
-        Element<T> element = new Element<>(bundle, value);
+        Element<T> element = new Element<T>(bundle, value);
         element.previous = tail;
         if (tail != null) tail.next = element;
         tail = element;
@@ -126,7 +126,7 @@ public class ManagedLinkedList<T> {
      * @return the array
      */
     public T[] toArray(T[] tArray) {
-        List<T> array = new ArrayList<>(100);
+        List<T> array = new ArrayList<T>(100);
         for (Iterator<T> it = iterator(); it.hasNext();) {
             T val = it.next();
             if (val != null) array.add(val);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/util/ReferenceManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/util/ReferenceManager.java b/src/main/java/org/codehaus/groovy/util/ReferenceManager.java
index da73d39..6ab6d56 100644
--- a/src/main/java/org/codehaus/groovy/util/ReferenceManager.java
+++ b/src/main/java/org/codehaus/groovy/util/ReferenceManager.java
@@ -79,7 +79,7 @@ public class ReferenceManager {
     private static class CallBackedManager extends ReferenceManager {
 
         private static final ConcurrentHashMap<ReferenceQueue, ReferenceManager> queuesInProcess
=
-                new ConcurrentHashMap<>(4, 0.9f, 2);
+                new ConcurrentHashMap<ReferenceQueue, ReferenceManager>(4, 0.9f, 2);
 
         public CallBackedManager(ReferenceQueue queue) {
             super(queue);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyArrayAccess.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyArrayAccess.java b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyArrayAccess.java
index bf1f8dc..92ce658 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyArrayAccess.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyArrayAccess.java
@@ -44,7 +44,7 @@ public class IndyArrayAccess {
 
     private static final HashMap<Class,MethodHandle> getterMap, setterMap;
     static {
-        getterMap = new HashMap<>();
+        getterMap = new HashMap<Class,MethodHandle>();
         Class[] classes = new Class[]{
                 int[].class, byte[].class, short[].class, long[].class,
                 double[].class, float[].class,
@@ -53,7 +53,7 @@ public class IndyArrayAccess {
             MethodHandle handle = buildGetter(arrayClass);
             getterMap.put(arrayClass, handle);
         }
-        setterMap = new HashMap<>();
+        setterMap = new HashMap<Class,MethodHandle>();
         for (Class arrayClass : classes) {
             MethodHandle handle = buildSetter(arrayClass);
             setterMap.put(arrayClass, handle);

http://git-wip-us.apache.org/repos/asf/groovy/blob/6ef32353/src/main/java/org/codehaus/groovy/vmplugin/v8/PluginDefaultGroovyMethods.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/PluginDefaultGroovyMethods.java
b/src/main/java/org/codehaus/groovy/vmplugin/v8/PluginDefaultGroovyMethods.java
index 34fc49e..7655899 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/PluginDefaultGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/PluginDefaultGroovyMethods.java
@@ -100,7 +100,7 @@ public class PluginDefaultGroovyMethods {
     public static <S,T> Future<T> collect(Future<S> self, @ClosureParams(FirstParam.FirstGenericType.class)
Closure<T> transform) {
         Objects.requireNonNull(self);
         Objects.requireNonNull(transform);
-        return new TransformedFuture<>(self, transform);
+        return new TransformedFuture<T>(self, transform);
     }
 
     private static class TransformedFuture<E> implements Future<E> {


Mime
View raw message