commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r829394 - /commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
Date Sat, 24 Oct 2009 16:02:23 GMT
Author: sebb
Date: Sat Oct 24 16:02:23 2009
New Revision: 829394

URL: http://svn.apache.org/viewvc?rev=829394&view=rev
Log:
Document unused items
Raw types

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java?rev=829394&r1=829393&r2=829394&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
Sat Oct 24 16:02:23 2009
@@ -68,15 +68,16 @@
     }
 
     private static class PrivateClass {
+        @SuppressWarnings("unused")
         public PrivateClass() {
         }
     }
 
-    private Map classCache;
+    private Map<Class<?>, Class<?>[]> classCache;
 
     public ConstructorUtilsTest(String name) {
         super(name);
-        classCache = new HashMap();
+        classCache = new HashMap<Class<?>, Class<?>[]>();
     }
 
     /**
@@ -210,21 +211,21 @@
                 singletonArray(Double.TYPE), singletonArray(Double.TYPE));
     }
 
-    private void expectMatchingAccessibleConstructorParameterTypes(Class cls,
-            Class[] requestTypes, Class[] actualTypes) {
-        Constructor c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
+    private void expectMatchingAccessibleConstructorParameterTypes(Class<?> cls,
+            Class<?>[] requestTypes, Class<?>[] actualTypes) {
+        Constructor<?> c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
                 requestTypes);
         assertTrue(toString(c.getParameterTypes()) + " not equals "
                 + toString(actualTypes), Arrays.equals(actualTypes, c
                 .getParameterTypes()));
     }
 
-    private String toString(Class[] c) {
+    private String toString(Class<?>[] c) {
         return Arrays.asList(c).toString();
     }
 
-    private Class[] singletonArray(Class c) {
-        Class[] result = (Class[]) classCache.get(c);
+    private Class<?>[] singletonArray(Class<?> c) {
+        Class<?>[] result = classCache.get(c);
         if (result == null) {
             result = new Class[] { c };
             classCache.put(c, result);



Mime
View raw message