commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r829549 - /commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/
Date Sun, 25 Oct 2009 11:45:55 GMT
Author: sebb
Date: Sun Oct 25 11:45:55 2009
New Revision: 829549

URL: http://svn.apache.org/viewvc?rev=829549&view=rev
Log:
Fix internal raw types

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/MultiLineToStringStyleTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/NoFieldNamesToStringStyleTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ShortPrefixToStringStyleTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/SimpleToStringStyleTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/MultiLineToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/MultiLineToStringStyleTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/MultiLineToStringStyleTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/MultiLineToStringStyleTest.java
Sun Oct 25 11:45:55 2009
@@ -88,10 +88,10 @@
         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(), 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", 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", (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());
     }

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/NoFieldNamesToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/NoFieldNamesToStringStyleTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/NoFieldNamesToStringStyleTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/NoFieldNamesToStringStyleTest.java
Sun Oct 25 11:45:55 2009
@@ -87,10 +87,10 @@
         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(), 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",
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",
(Object) new String[0], false).toString());
         assertEquals(baseStr + "[{}]", new ToStringBuilder(base).append("a", (Object) new
String[0], true).toString());
     }

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
Sun Oct 25 11:45:55 2009
@@ -69,21 +69,21 @@
     }
 
     public void test_toStringExcludeCollection() {
-        List excludeList = new ArrayList();
+        List<String> excludeList = new ArrayList<String>();
         excludeList.add(SECRET_FIELD);
         String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);
         this.validateSecretFieldAbsent(toString);
     }
 
     public void test_toStringExcludeCollectionWithNull() {
-        List excludeList = new ArrayList();
+        List<String> excludeList = new ArrayList<String>();
         excludeList.add(null);
         String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);
         this.validateSecretFieldPresent(toString);
     }
 
     public void test_toStringExcludeCollectionWithNulls() {
-        List excludeList = new ArrayList();
+        List<String> excludeList = new ArrayList<String>();
         excludeList.add(null);
         excludeList.add(null);
         String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), excludeList);
@@ -96,7 +96,7 @@
     }
 
     public void test_toStringExcludeEmptyCollection() {
-        String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), new
ArrayList());
+        String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), new
ArrayList<String>());
         this.validateSecretFieldPresent(toString);
     }
 
@@ -106,7 +106,7 @@
     }
 
     public void test_toStringExcludeNullCollection() {
-        String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), (Collection)
null);
+        String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), (Collection<String>)
null);
         this.validateSecretFieldPresent(toString);
     }
 

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ShortPrefixToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ShortPrefixToStringStyleTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ShortPrefixToStringStyleTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ShortPrefixToStringStyleTest.java
Sun Oct 25 11:45:55 2009
@@ -70,10 +70,10 @@
         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(), 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",
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",
(Object) new String[0], false).toString());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new
String[0], true).toString());
     }

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/SimpleToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/SimpleToStringStyleTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/SimpleToStringStyleTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/SimpleToStringStyleTest.java
Sun Oct 25 11:45:55 2009
@@ -86,10 +86,10 @@
         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(),
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", 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", (Object) new
String[0], false).toString());
         assertEquals("{}", new ToStringBuilder(base).append("a", (Object) new String[0],
true).toString());
     }

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java
Sun Oct 25 11:45:55 2009
@@ -102,10 +102,10 @@
         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(), 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", 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", (Object)
new String[0], false).toString());
         assertEquals(baseStr + "[a=[]]", new ToStringBuilder(base).append("a", (Object) new
String[0], true).toString());
     }

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java?rev=829549&r1=829548&r2=829549&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
Sun Oct 25 11:45:55 2009
@@ -324,7 +324,7 @@
     // Reflection hierarchy tests
 
     public void testReflectionHierarchyArrayList() {
-        List base = new ArrayList();
+        List<Object> base = new ArrayList<Object>();
         String baseStr = this.toBaseString(base);
         assertEquals(baseStr + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]",
ToStringBuilder.reflectionToString(base, null, true));
         assertEquals(baseStr + "[size=0]", ToStringBuilder.reflectionToString(base, null,
false));
@@ -638,10 +638,10 @@
         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(), 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",
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",
(Object) new String[0], false).toString());
         assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new
String[0], true).toString());
     }



Mime
View raw message