commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/2] [lang] Remove redundant type arguments.
Date Sun, 23 Oct 2016 17:52:55 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 7e8df326f -> 4f82195af


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java
index bdfd35d..2f85751 100644
--- a/src/test/java/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java
@@ -72,10 +72,10 @@ public class MultiLineToStringStyleTest {
         assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=3" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=3" + SystemUtils.LINE_SEPARATOR + "  b=4" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<Integer>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<size=0>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=[]" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<size=0>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a={}" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<size=0>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=[]" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<size=0>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a={}" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a=<size=0>" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[" + SystemUtils.LINE_SEPARATOR + "  a={}" + SystemUtils.LINE_SEPARATOR + "]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java
index 274b2f2..e4e4284 100644
--- a/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java
@@ -239,7 +239,7 @@ public class MultilineRecursiveToStringStyleTest {
 
     static class Account {
         Customer owner;
-        List<Transaction> transactions = new ArrayList<Transaction>();
+        List<Transaction> transactions = new ArrayList<>();
 
         public double getBalance() {
             double balance = 0;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/NoClassNameToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/NoClassNameToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/NoClassNameToStringStyleTest.java
index 43f18af..73184a5 100644
--- a/src/test/java/org/apache/commons/lang3/builder/NoClassNameToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/NoClassNameToStringStyleTest.java
@@ -70,10 +70,10 @@ public class NoClassNameToStringStyleTest {
         assertEquals("[a=3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals("[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals("[a=<Integer>]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals("[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals("[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals("[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals("[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals("[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals("[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals("[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals("[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals("[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals("[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java
index 247e22a..d5388a9 100644
--- a/src/test/java/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java
@@ -71,10 +71,10 @@ public class NoFieldNamesToStringStyleTest {
         assertEquals(baseStr + "[3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[3,4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[<Integer>]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[{}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[{}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[{}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/RecursiveToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/RecursiveToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/RecursiveToStringStyleTest.java
index fe385e3..bbe7d2b 100644
--- a/src/test/java/org/apache/commons/lang3/builder/RecursiveToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/RecursiveToStringStyleTest.java
@@ -70,10 +70,10 @@ public class RecursiveToStringStyleTest {
         assertEquals(baseStr + "[a=3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[a=<Integer>]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
index bcf5074..d5249d5 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
@@ -108,7 +108,7 @@ public class ReflectionToStringBuilderConcurrencyTest {
                 return Integer.valueOf(REPEAT);
             }
         };
-        final Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
+        final Collection<Callable<Integer>> tasks = new ArrayList<>();
         tasks.add(consumer);
         tasks.add(producer);
         final List<Future<Integer>> futures = threadPool.invokeAll(tasks);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeTest.java b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeTest.java
index 9e7fc0c..75b80b2 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeTest.java
@@ -72,7 +72,7 @@ public class ReflectionToStringBuilderExcludeTest {
 
     @Test
     public void test_toStringExcludeCollection() {
-        final List<String> excludeList = new ArrayList<String>();
+        final List<String> excludeList = new ArrayList<>();
         excludeList.add(SECRET_FIELD);
         final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);
         this.validateSecretFieldAbsent(toString);
@@ -80,7 +80,7 @@ public class ReflectionToStringBuilderExcludeTest {
 
     @Test
     public void test_toStringExcludeCollectionWithNull() {
-        final List<String> excludeList = new ArrayList<String>();
+        final List<String> excludeList = new ArrayList<>();
         excludeList.add(null);
         final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);
         this.validateSecretFieldPresent(toString);
@@ -88,7 +88,7 @@ public class ReflectionToStringBuilderExcludeTest {
 
     @Test
     public void test_toStringExcludeCollectionWithNulls() {
-        final List<String> excludeList = new ArrayList<String>();
+        final List<String> excludeList = new ArrayList<>();
         excludeList.add(null);
         excludeList.add(null);
         final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
index 7fbf506..8cb58e5 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
 public class ReflectionToStringBuilderMutateInspectConcurrencyTest {
 
     class TestFixture {
-        final private LinkedList<Integer> listField = new LinkedList<Integer>();
+        final private LinkedList<Integer> listField = new LinkedList<>();
         final private Random random = new Random();
         private final int N = 100;
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ShortPrefixToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ShortPrefixToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/ShortPrefixToStringStyleTest.java
index f4afd53..e27e9f1 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ShortPrefixToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ShortPrefixToStringStyleTest.java
@@ -71,10 +71,10 @@ public class ShortPrefixToStringStyleTest {
         assertEquals(baseStr + "[a=3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[a=<Integer>]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java
index 63739b3..1bf18db 100644
--- a/src/test/java/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java
@@ -70,10 +70,10 @@ public class SimpleToStringStyleTest {
         assertEquals("3", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals("3,4", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals("<Integer>", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals("<size=0>", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals("[]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals("<size=0>", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals("{}", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals("<size=0>", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals("[]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals("<size=0>", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals("{}", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals("<size=0>", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals("{}", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/StandardToStringStyleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/StandardToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/StandardToStringStyleTest.java
index 3ab17e3..17b19d0 100644
--- a/src/test/java/org/apache/commons/lang3/builder/StandardToStringStyleTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/StandardToStringStyleTest.java
@@ -86,10 +86,10 @@ public class StandardToStringStyleTest {
         assertEquals(baseStr + "[a=3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[a=%Integer%]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[a=%SIZE=0%]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[a=%SIZE=0%]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[a=%SIZE=0%]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[a=%SIZE=0%]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[a=%SIZE=0%]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
index c55fe2f..322c204 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
@@ -315,7 +315,7 @@ public class ToStringBuilderTest {
         // representation different for IBM JDK 1.6.0, LANG-727
         assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
         assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
-        final List<Object> list = new ArrayList<Object>();
+        final List<Object> list = new ArrayList<>();
         final String baseString = this.toBaseString(list);
         final String expectedWithTransients = baseString + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
         final String toStringWithTransients = ToStringBuilder.reflectionToString(list, null, true);
@@ -624,10 +624,10 @@ public class ToStringBuilderTest {
         assertEquals(baseStr + "[a=3]", new ToStringBuilder(base).append("a", i3).toString());
         assertEquals(baseStr + "[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).toString());
         assertEquals(baseStr + "[a=<Integer>]", new ToStringBuilder(base).append("a", i3, false).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).toString());
-        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).toString());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).toString());
-        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).toString());
+        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).toString());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).toString());
+        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).toString());
         assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
     }
@@ -642,10 +642,10 @@ public class ToStringBuilderTest {
         assertEquals(baseStr + "[a=3]", new ToStringBuilder(base).append("a", i3).build());
         assertEquals(baseStr + "[a=3,b=4]", new ToStringBuilder(base).append("a", i3).append("b", i4).build());
         assertEquals(baseStr + "[a=<Integer>]", new ToStringBuilder(base).append("a", i3, false).build());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), false).build());
-        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<Object>(), true).build());
-        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), false).build());
-        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<Object, Object>(), true).build());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new ArrayList<>(), false).build());
+        assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", new ArrayList<>(), true).build());
+        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", new HashMap<>(), false).build());
+        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", new HashMap<>(), true).build());
         assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).build());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).build());
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java b/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
index b714663..40dd273 100644
--- a/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
@@ -60,7 +60,7 @@ public class ToStringStyleConcurrencyTest {
     private static final int REPEAT = 100;
 
     static {
-        LIST = new ArrayList<Integer>(LIST_SIZE);
+        LIST = new ArrayList<>(LIST_SIZE);
         for (int i = 0; i < LIST_SIZE; i++) {
             LIST.add(Integer.valueOf(i));
         }
@@ -99,7 +99,7 @@ public class ToStringStyleConcurrencyTest {
                 return Integer.valueOf(REPEAT);
             }
         };
-        final Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
+        final Collection<Callable<Integer>> tasks = new ArrayList<>();
         tasks.add(consumer);
         tasks.add(consumer);
         final List<Future<Integer>> futures = threadPool.invokeAll(tasks);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
index c480599..1a0f911 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
@@ -222,7 +222,7 @@ public class BackgroundInitializerTest {
         final CountDownLatch latch1 = new CountDownLatch(1);
         init.shouldSleep = true;
         init.start();
-        final AtomicReference<InterruptedException> iex = new AtomicReference<InterruptedException>();
+        final AtomicReference<InterruptedException> iex = new AtomicReference<>();
         final Thread getThread = new Thread() {
             @Override
             public void run() {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java
index 0c240d2..caad3b3 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java
@@ -38,7 +38,7 @@ public class CallableBackgroundInitializerTest  {
      */
     @Test(expected=IllegalArgumentException.class)
     public void testInitNullCallable() {
-        new CallableBackgroundInitializer<Object>(null);
+        new CallableBackgroundInitializer<>(null);
     }
 
     /**
@@ -48,7 +48,7 @@ public class CallableBackgroundInitializerTest  {
     @Test
     public void testInitExecutor() throws InterruptedException {
         final ExecutorService exec = Executors.newSingleThreadExecutor();
-        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
+        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<>(
                 new TestCallable(), exec);
         assertEquals("Executor not set", exec, init.getExternalExecutor());
         exec.shutdown();
@@ -79,7 +79,7 @@ public class CallableBackgroundInitializerTest  {
     @Test
     public void testInitialize() throws Exception {
         final TestCallable call = new TestCallable();
-        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
+        final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<>(
                 call);
         assertEquals("Wrong result", RESULT, init.initialize());
         assertEquals("Wrong number of invocations", 1, call.callCount);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java b/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java
index 48e4451..fd5ccd5 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java
@@ -434,7 +434,7 @@ public class ConcurrentUtilsTest {
     public void testPutIfAbsentKeyPresent() {
         final String key = "testKey";
         final Integer value = 42;
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         map.put(key, value);
         assertEquals("Wrong result", value,
                 ConcurrentUtils.putIfAbsent(map, key, 0));
@@ -448,7 +448,7 @@ public class ConcurrentUtilsTest {
     public void testPutIfAbsentKeyNotPresent() {
         final String key = "testKey";
         final Integer value = 42;
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.putIfAbsent(map, key, value));
         assertEquals("Wrong value in map", value, map.get(key));
@@ -477,7 +477,7 @@ public class ConcurrentUtilsTest {
         EasyMock.replay(init);
         final String key = "testKey";
         final Integer value = 42;
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         map.put(key, value);
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsent(map, key, init));
@@ -500,7 +500,7 @@ public class ConcurrentUtilsTest {
         final Integer value = 42;
         EasyMock.expect(init.get()).andReturn(value);
         EasyMock.replay(init);
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsent(map, key, init));
         assertEquals("Wrong value in map", value, map.get(key));
@@ -531,7 +531,7 @@ public class ConcurrentUtilsTest {
      */
     @Test
     public void testCreateIfAbsentNullInit() throws ConcurrentException {
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         final String key = "testKey";
         final Integer value = 42;
         map.put(key, value);
@@ -547,10 +547,10 @@ public class ConcurrentUtilsTest {
     public void testCreateIfAbsentUncheckedSuccess() {
         final String key = "testKey";
         final Integer value = 42;
-        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<String, Integer>();
+        final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
         assertEquals("Wrong result", value,
                 ConcurrentUtils.createIfAbsentUnchecked(map, key,
-                        new ConstantInitializer<Integer>(value)));
+                        new ConstantInitializer<>(value)));
         assertEquals("Wrong value in map", value, map.get(key));
     }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java
index 8c09b50..040f66b 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/ConstantInitializerTest.java
@@ -36,7 +36,7 @@ public class ConstantInitializerTest {
 
     @Before
     public void setUp() throws Exception {
-        init = new ConstantInitializer<Integer>(VALUE);
+        init = new ConstantInitializer<>(VALUE);
     }
 
     /**
@@ -80,11 +80,11 @@ public class ConstantInitializerTest {
     @Test
     public void testEqualsTrue() {
         checkEquals(init, true);
-        ConstantInitializer<Integer> init2 = new ConstantInitializer<Integer>(
+        ConstantInitializer<Integer> init2 = new ConstantInitializer<>(
                 Integer.valueOf(VALUE.intValue()));
         checkEquals(init2, true);
-        init = new ConstantInitializer<Integer>(null);
-        init2 = new ConstantInitializer<Integer>(null);
+        init = new ConstantInitializer<>(null);
+        init2 = new ConstantInitializer<>(null);
         checkEquals(init2, true);
     }
 
@@ -93,10 +93,10 @@ public class ConstantInitializerTest {
      */
     @Test
     public void testEqualsFalse() {
-        ConstantInitializer<Integer> init2 = new ConstantInitializer<Integer>(
+        ConstantInitializer<Integer> init2 = new ConstantInitializer<>(
                 null);
         checkEquals(init2, false);
-        init2 = new ConstantInitializer<Integer>(VALUE + 1);
+        init2 = new ConstantInitializer<>(VALUE + 1);
         checkEquals(init2, false);
     }
 
@@ -107,7 +107,7 @@ public class ConstantInitializerTest {
     public void testEqualsWithOtherObjects() {
         checkEquals(null, false);
         checkEquals(this, false);
-        checkEquals(new ConstantInitializer<String>("Test"), false);
+        checkEquals(new ConstantInitializer<>("Test"), false);
     }
 
     /**
@@ -127,7 +127,7 @@ public class ConstantInitializerTest {
      */
     @Test
     public void testToStringNull() {
-        final String s = new ConstantInitializer<Object>(null).toString();
+        final String s = new ConstantInitializer<>(null).toString();
         assertTrue("Object not found: " + s, s.indexOf("object = null") > 0);
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
index 8b685e9..df0ef7d 100644
--- a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
+++ b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java
@@ -376,7 +376,7 @@ public class EventCountCircuitBreakerTest {
          */
         public ChangeListener(Object source) {
             expectedSource = source;
-            changedValues = new ArrayList<Boolean>();
+            changedValues = new ArrayList<>();
         }
 
         public void propertyChange(PropertyChangeEvent evt) {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java b/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
index 2f1ecf1..f5b74ff 100644
--- a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
+++ b/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
@@ -76,7 +76,7 @@ public class EventListenerSupportTest {
     @Test
     public void testEventDispatchOrder() throws PropertyVetoException {
         final EventListenerSupport<VetoableChangeListener> listenerSupport = EventListenerSupport.create(VetoableChangeListener.class);
-        final List<VetoableChangeListener> calledListeners = new ArrayList<VetoableChangeListener>();
+        final List<VetoableChangeListener> calledListeners = new ArrayList<>();
 
         final VetoableChangeListener listener1 = createListener(calledListeners);
         final VetoableChangeListener listener2 = createListener(calledListeners);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java b/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
index 58c5b67..4c8d615 100644
--- a/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
@@ -200,7 +200,7 @@ public class EventUtilsTest
 
     private static class EventCountingInvociationHandler implements InvocationHandler
     {
-        private final Map<String, Integer> eventCounts = new TreeMap<String, Integer>();
+        private final Map<String, Integer> eventCounts = new TreeMap<>();
 
         public <L> L createListener(final Class<L> listenerType)
         {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java b/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
index 763b244..5730d01 100644
--- a/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
+++ b/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
@@ -32,15 +32,15 @@ public class MutableObjectTest {
         assertEquals(null, new MutableObject<String>().getValue());
         
         final Integer i = Integer.valueOf(6);
-        assertSame(i, new MutableObject<Integer>(i).getValue());
-        assertSame("HI", new MutableObject<String>("HI").getValue());
-        assertSame(null, new MutableObject<Object>(null).getValue());
+        assertSame(i, new MutableObject<>(i).getValue());
+        assertSame("HI", new MutableObject<>("HI").getValue());
+        assertSame(null, new MutableObject<>(null).getValue());
     }
 
     @Test
     public void testGetSet() {
-        final MutableObject<String> mutNum = new MutableObject<String>();
-        assertEquals(null, new MutableObject<Object>().getValue());
+        final MutableObject<String> mutNum = new MutableObject<>();
+        assertEquals(null, new MutableObject<>().getValue());
         
         mutNum.setValue("HELLO");
         assertSame("HELLO", mutNum.getValue());
@@ -51,10 +51,10 @@ public class MutableObjectTest {
 
     @Test
     public void testEquals() {
-        final MutableObject<String> mutNumA = new MutableObject<String>("ALPHA");
-        final MutableObject<String> mutNumB = new MutableObject<String>("ALPHA");
-        final MutableObject<String> mutNumC = new MutableObject<String>("BETA");
-        final MutableObject<String> mutNumD = new MutableObject<String>(null);
+        final MutableObject<String> mutNumA = new MutableObject<>("ALPHA");
+        final MutableObject<String> mutNumB = new MutableObject<>("ALPHA");
+        final MutableObject<String> mutNumC = new MutableObject<>("BETA");
+        final MutableObject<String> mutNumD = new MutableObject<>(null);
 
         assertTrue(mutNumA.equals(mutNumA));
         assertTrue(mutNumA.equals(mutNumB));
@@ -73,10 +73,10 @@ public class MutableObjectTest {
 
     @Test
     public void testHashCode() {
-        final MutableObject<String> mutNumA = new MutableObject<String>("ALPHA");
-        final MutableObject<String> mutNumB = new MutableObject<String>("ALPHA");
-        final MutableObject<String> mutNumC = new MutableObject<String>("BETA");
-        final MutableObject<String> mutNumD = new MutableObject<String>(null);
+        final MutableObject<String> mutNumA = new MutableObject<>("ALPHA");
+        final MutableObject<String> mutNumB = new MutableObject<>("ALPHA");
+        final MutableObject<String> mutNumC = new MutableObject<>("BETA");
+        final MutableObject<String> mutNumD = new MutableObject<>(null);
 
         assertTrue(mutNumA.hashCode() == mutNumA.hashCode());
         assertTrue(mutNumA.hashCode() == mutNumB.hashCode());
@@ -88,9 +88,9 @@ public class MutableObjectTest {
 
     @Test
     public void testToString() {
-        assertEquals("HI", new MutableObject<String>("HI").toString());
-        assertEquals("10.0", new MutableObject<Double>(Double.valueOf(10)).toString());
-        assertEquals("null", new MutableObject<Object>(null).toString());
+        assertEquals("HI", new MutableObject<>("HI").toString());
+        assertEquals("10.0", new MutableObject<>(Double.valueOf(10)).toString());
+        assertEquals("null", new MutableObject<>(null).toString());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java
index dff8a8d..42e1295 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java
@@ -116,7 +116,7 @@ public class ConstructorUtilsTest {
     private final Map<Class<?>, Class<?>[]> classCache;
 
     public ConstructorUtilsTest() {
-        classCache = new HashMap<Class<?>, Class<?>[]>();
+        classCache = new HashMap<>();
     }
 
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
index e2957a8..017828b 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
@@ -160,7 +160,7 @@ public class FieldUtilsTest {
         final List<Field> fieldsNumber = Arrays.asList(Number.class.getDeclaredFields());
         assertEquals(fieldsNumber, FieldUtils.getAllFieldsList(Number.class));
         final List<Field> fieldsInteger = Arrays.asList(Integer.class.getDeclaredFields());
-        final List<Field> allFieldsInteger = new ArrayList<Field>(fieldsInteger);
+        final List<Field> allFieldsInteger = new ArrayList<>(fieldsInteger);
         allFieldsInteger.addAll(fieldsNumber);
         assertEquals(allFieldsInteger, FieldUtils.getAllFieldsList(Integer.class));
         assertEquals(5, FieldUtils.getAllFieldsList(PublicChild.class).size());

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java
index fc78008..5e74fc9 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java
@@ -249,7 +249,7 @@ public class MethodUtilsTest {
     }
 
     private TestBean testBean;
-    private final Map<Class<?>, Class<?>[]> classCache = new HashMap<Class<?>, Class<?>[]>();
+    private final Map<Class<?>, Class<?>[]> classCache = new HashMap<>();
 
     @Before
     public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index 66477ea..323f0dd 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -525,7 +525,7 @@ public class TypeUtilsTest<B> {
     @Test
     public void testTypesSatisfyVariables() throws SecurityException, NoSuchFieldException,
             NoSuchMethodException {
-        final Map<TypeVariable<?>, Type> typeVarAssigns = new HashMap<TypeVariable<?>, Type>();
+        final Map<TypeVariable<?>, Type> typeVarAssigns = new HashMap<>();
         final Integer max = TypeUtilsTest.<Integer> stub();
         typeVarAssigns.put(getClass().getMethod("stub").getTypeParameters()[0], Integer.class);
         Assert.assertTrue(TypeUtils.typesSatisfyVariables(typeVarAssigns));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java b/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
index 79ff231..b2464ac 100644
--- a/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
@@ -45,7 +45,7 @@ import org.apache.commons.lang3.SystemUtils;
  */
 public class ExtendedMessageFormatTest {
 
-    private final Map<String, FormatFactory> registry = new HashMap<String, FormatFactory>();
+    private final Map<String, FormatFactory> registry = new HashMap<>();
 
     @Before
     public void setUp() throws Exception {
@@ -116,7 +116,7 @@ public class ExtendedMessageFormatTest {
         final String extendedPattern = "Name: {0,upper} ";
         final String pattern = extendedPattern + builtinsPattern;
 
-        final HashSet<Locale> testLocales = new HashSet<Locale>();
+        final HashSet<Locale> testLocales = new HashSet<>();
         testLocales.addAll(Arrays.asList(DateFormat.getAvailableLocales()));
         testLocales.retainAll(Arrays.asList(NumberFormat.getAvailableLocales()));
         testLocales.add(null);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java b/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
index 9190185..737c1e1 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
@@ -95,7 +95,7 @@ public class StrLookupTest  {
 
     @Test
     public void testMapLookup() {
-        final Map<String, Object> map = new HashMap<String, Object>();
+        final Map<String, Object> map = new HashMap<>();
         map.put("key", "value");
         map.put("number", Integer.valueOf(2));
         assertEquals("value", StrLookup.mapLookup(map).lookup("key"));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java b/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
index 2f8759f..1623dea 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
@@ -42,7 +42,7 @@ public class StrSubstitutorTest {
 
     @Before
     public void setUp() throws Exception {
-        values = new HashMap<String, String>();
+        values = new HashMap<>();
         values.put("animal", "quick brown fox");
         values.put("target", "lazy dog");
     }
@@ -235,7 +235,7 @@ public class StrSubstitutorTest {
      */
     @Test
     public void testCyclicReplacement() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("animal", "${critter}");
         map.put("target", "${pet}");
         map.put("pet", "${petCharacteristic} dog");
@@ -364,7 +364,7 @@ public class StrSubstitutorTest {
 
     @Test
     public void testDefaultValueDelimiters() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("animal", "fox");
         map.put("target", "dog");
 
@@ -402,7 +402,7 @@ public class StrSubstitutorTest {
     @Test
     public void testResolveVariable() {
         final StrBuilder builder = new StrBuilder("Hi ${name}!");
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("name", "commons");
         final StrSubstitutor sub = new StrSubstitutor(map) {
             @Override
@@ -433,7 +433,7 @@ public class StrSubstitutorTest {
      */
     @Test
     public void testConstructorMapPrefixSuffix() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("name", "commons");
         final StrSubstitutor sub = new StrSubstitutor(map, "<", ">");
         assertEquals("Hi < commons", sub.replace("Hi $< <name>"));
@@ -444,7 +444,7 @@ public class StrSubstitutorTest {
      */
     @Test
     public void testConstructorMapFull() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("name", "commons");
         StrSubstitutor sub = new StrSubstitutor(map, "<", ">", '!');
         assertEquals("Hi < commons", sub.replace("Hi !< <name>"));
@@ -556,7 +556,7 @@ public class StrSubstitutorTest {
      */
     @Test
     public void testStaticReplace() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("name", "commons");
         assertEquals("Hi commons!", StrSubstitutor.replace("Hi ${name}!", map));
     }
@@ -566,7 +566,7 @@ public class StrSubstitutorTest {
      */
     @Test
     public void testStaticReplacePrefixSuffix() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("name", "commons");
         assertEquals("Hi commons!", StrSubstitutor.replace("Hi <name>!", map, "<", ">"));
     }
@@ -615,7 +615,7 @@ public class StrSubstitutorTest {
 
     @Test
     public void testSamePrefixAndSuffix() {
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("greeting", "Hello");
         map.put(" there ", "XXX");
         map.put("name", "commons");
@@ -626,7 +626,7 @@ public class StrSubstitutorTest {
     @Test
     public void testSubstitutePreserveEscape() {
         final String org = "${not-escaped} $${escaped}";
-        final Map<String, String> map = new HashMap<String, String>();
+        final Map<String, String> map = new HashMap<>();
         map.put("not-escaped", "value");
 
         StrSubstitutor sub = new StrSubstitutor(map, "${", "}", '$');
@@ -678,7 +678,7 @@ public class StrSubstitutorTest {
         }
 
         // replace using object
-        final MutableObject<String> obj = new MutableObject<String>(replaceTemplate);  // toString returns template
+        final MutableObject<String> obj = new MutableObject<>(replaceTemplate);  // toString returns template
         assertEquals(expectedResult, sub.replace(obj));
 
         // replace in StringBuffer

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/text/translate/EntityArraysTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/translate/EntityArraysTest.java b/src/test/java/org/apache/commons/lang3/text/translate/EntityArraysTest.java
index 2d33b7b..b251516 100644
--- a/src/test/java/org/apache/commons/lang3/text/translate/EntityArraysTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/translate/EntityArraysTest.java
@@ -37,8 +37,8 @@ public class EntityArraysTest  {
     // LANG-659 - check arrays for duplicate entries
     @Test
     public void testHTML40_EXTENDED_ESCAPE(){
-        final Set<String> col0 = new HashSet<String>();
-        final Set<String> col1 = new HashSet<String>();
+        final Set<String> col0 = new HashSet<>();
+        final Set<String> col1 = new HashSet<>();
         final String [][] sa = EntityArrays.HTML40_EXTENDED_ESCAPE();
         for(int i =0; i <sa.length; i++){
             assertTrue("Already added entry 0: "+i+" "+sa[i][0],col0.add(sa[i][0]));
@@ -49,8 +49,8 @@ public class EntityArraysTest  {
    // LANG-658 - check arrays for duplicate entries
     @Test
     public void testISO8859_1_ESCAPE(){
-        final Set<String> col0 = new HashSet<String>();
-        final Set<String> col1 = new HashSet<String>();
+        final Set<String> col0 = new HashSet<>();
+        final Set<String> col1 = new HashSet<>();
         final String [][] sa = EntityArrays.ISO8859_1_ESCAPE();
         boolean success = true;
         for(int i =0; i <sa.length; i++){

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index 5c52a6c..1444396 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -102,7 +102,7 @@ public class FastDateParserTest {
             getInstance(MDY_SLASH, REYKJAVIK, SWEDEN)
         };
 
-        final Map<DateParser,Integer> map= new HashMap<DateParser,Integer>();
+        final Map<DateParser,Integer> map= new HashMap<>();
         int i= 0;
         for(final DateParser parser:parsers) {
             map.put(parser, Integer.valueOf(i++));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
index 3ae5f56..e669a24 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java
@@ -37,7 +37,7 @@ public class FastDatePrinterTimeZonesTest {
     @Parameterized.Parameters
     public static Collection<TimeZone> data() {
         final String[] zoneIds = TimeZone.getAvailableIDs();
-        List<TimeZone> timeZones = new ArrayList<TimeZone>();
+        List<TimeZone> timeZones = new ArrayList<>();
         for (String zoneId : zoneIds) {
             timeZones.add(TimeZone.getTimeZone(zoneId));
         }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/ImmutablePairTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/ImmutablePairTest.java b/src/test/java/org/apache/commons/lang3/tuple/ImmutablePairTest.java
index 462122c..f73d7b5 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/ImmutablePairTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/ImmutablePairTest.java
@@ -35,12 +35,12 @@ public class ImmutablePairTest {
 
     @Test
     public void testBasic() throws Exception {
-        final ImmutablePair<Integer, String> pair = new ImmutablePair<Integer, String>(0, "foo");
+        final ImmutablePair<Integer, String> pair = new ImmutablePair<>(0, "foo");
         assertEquals(0, pair.left.intValue());
         assertEquals(0, pair.getLeft().intValue());
         assertEquals("foo", pair.right);
         assertEquals("foo", pair.getRight());
-        final ImmutablePair<Object, String> pair2 = new ImmutablePair<Object, String>(null, "bar");
+        final ImmutablePair<Object, String> pair2 = new ImmutablePair<>(null, "bar");
         assertNull(pair2.left);
         assertNull(pair2.getLeft());
         assertEquals("bar", pair2.right);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java b/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java
index 42b5ed6..3e36932 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java
@@ -35,14 +35,14 @@ public class ImmutableTripleTest {
 
     @Test
     public void testBasic() throws Exception {
-        final ImmutableTriple<Integer, String, Boolean> triple = new ImmutableTriple<Integer, String, Boolean>(0, "foo", Boolean.TRUE);
+        final ImmutableTriple<Integer, String, Boolean> triple = new ImmutableTriple<>(0, "foo", Boolean.TRUE);
         assertEquals(0, triple.left.intValue());
         assertEquals(0, triple.getLeft().intValue());
         assertEquals("foo", triple.middle);
         assertEquals("foo", triple.getMiddle());
         assertEquals(Boolean.TRUE, triple.right);
         assertEquals(Boolean.TRUE, triple.getRight());
-        final ImmutableTriple<Object, String, Integer> triple2 = new ImmutableTriple<Object, String, Integer>(null, "bar", 42);
+        final ImmutableTriple<Object, String, Integer> triple2 = new ImmutableTriple<>(null, "bar", 42);
         assertNull(triple2.left);
         assertNull(triple2.getLeft());
         assertEquals("bar", triple2.middle);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java b/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java
index 11daffe..b8eed24 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/MutablePairTest.java
@@ -35,24 +35,24 @@ public class MutablePairTest {
 
     @Test
     public void testBasic() throws Exception {
-        final MutablePair<Integer, String> pair = new MutablePair<Integer, String>(0, "foo");
+        final MutablePair<Integer, String> pair = new MutablePair<>(0, "foo");
         assertEquals(0, pair.getLeft().intValue());
         assertEquals("foo", pair.getRight());
-        final MutablePair<Object, String> pair2 = new MutablePair<Object, String>(null, "bar");
+        final MutablePair<Object, String> pair2 = new MutablePair<>(null, "bar");
         assertNull(pair2.getLeft());
         assertEquals("bar", pair2.getRight());
     }
 
     @Test
     public void testDefault() throws Exception {
-        final MutablePair<Integer, String> pair = new MutablePair<Integer, String>();
+        final MutablePair<Integer, String> pair = new MutablePair<>();
         assertNull(pair.getLeft());
         assertNull(pair.getRight());
     }
     
     @Test
     public void testMutate() throws Exception {
-        final MutablePair<Integer, String> pair = new MutablePair<Integer, String>(0, "foo");
+        final MutablePair<Integer, String> pair = new MutablePair<>(0, "foo");
         pair.setLeft(42);
         pair.setRight("bar");
         assertEquals(42, pair.getLeft().intValue());

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/MutableTripleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/MutableTripleTest.java b/src/test/java/org/apache/commons/lang3/tuple/MutableTripleTest.java
index 002b697..dc18ddb 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/MutableTripleTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/MutableTripleTest.java
@@ -35,11 +35,11 @@ public class MutableTripleTest {
 
     @Test
     public void testBasic() throws Exception {
-        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<Integer, String, Boolean>(0, "foo", Boolean.FALSE);
+        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<>(0, "foo", Boolean.FALSE);
         assertEquals(0, triple.getLeft().intValue());
         assertEquals("foo", triple.getMiddle());
         assertEquals(Boolean.FALSE, triple.getRight());
-        final MutableTriple<Object, String, String> triple2 = new MutableTriple<Object, String, String>(null, "bar", "hello");
+        final MutableTriple<Object, String, String> triple2 = new MutableTriple<>(null, "bar", "hello");
         assertNull(triple2.getLeft());
         assertEquals("bar", triple2.getMiddle());
         assertEquals("hello", triple2.getRight());
@@ -47,7 +47,7 @@ public class MutableTripleTest {
 
     @Test
     public void testDefault() throws Exception {
-        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<Integer, String, Boolean>();
+        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<>();
         assertNull(triple.getLeft());
         assertNull(triple.getMiddle());
         assertNull(triple.getRight());
@@ -55,7 +55,7 @@ public class MutableTripleTest {
     
     @Test
     public void testMutate() throws Exception {
-        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<Integer, String, Boolean>(0, "foo", Boolean.TRUE);
+        final MutableTriple<Integer, String, Boolean> triple = new MutableTriple<>(0, "foo", Boolean.TRUE);
         triple.setLeft(42);
         triple.setMiddle("bar");
         triple.setRight(Boolean.FALSE);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/PairTest.java b/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
index 4f52a83..3591373 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/PairTest.java
@@ -51,7 +51,7 @@ public class PairTest {
         final Pair<Integer, String> pair2 = MutablePair.of(0, "foo");
         assertEquals(pair, pair2);
         assertEquals(pair.hashCode(), pair2.hashCode());
-        final HashSet<Pair<Integer, String>> set = new HashSet<Pair<Integer, String>>();
+        final HashSet<Pair<Integer, String>> set = new HashSet<>();
         set.add(pair);
         assertTrue(set.contains(pair2));
 
@@ -63,7 +63,7 @@ public class PairTest {
     @Test
     public void testMapEntry() throws Exception {
         final Pair<Integer, String> pair = ImmutablePair.of(0, "foo");
-        final HashMap<Integer, String> map = new HashMap<Integer, String>();
+        final HashMap<Integer, String> map = new HashMap<>();
         map.put(0, "foo");
         final Entry<Integer, String> entry = map.entrySet().iterator().next();
         assertEquals(pair, entry);

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4f82195a/src/test/java/org/apache/commons/lang3/tuple/TripleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/tuple/TripleTest.java b/src/test/java/org/apache/commons/lang3/tuple/TripleTest.java
index 6f915c9..2466790 100644
--- a/src/test/java/org/apache/commons/lang3/tuple/TripleTest.java
+++ b/src/test/java/org/apache/commons/lang3/tuple/TripleTest.java
@@ -50,7 +50,7 @@ public class TripleTest {
         final Triple<Integer, String, Boolean> triple2 = MutableTriple.of(0, "foo", Boolean.TRUE);
         assertEquals(triple, triple2);
         assertEquals(triple.hashCode(), triple2.hashCode());
-        final HashSet<Triple<Integer, String, Boolean>> set = new HashSet<Triple<Integer, String, Boolean>>();
+        final HashSet<Triple<Integer, String, Boolean>> set = new HashSet<>();
         set.add(triple);
         assertTrue(set.contains(triple2));
     }


Mime
View raw message