directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r582487 - /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java
Date Sat, 06 Oct 2007 12:33:56 GMT
Author: elecharny
Date: Sat Oct  6 05:33:55 2007
New Revision: 582487

URL: http://svn.apache.org/viewvc?rev=582487&view=rev
Log:
Removed warnings adding <?> to Class

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java?rev=582487&r1=582486&r2=582487&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/util/DirectoryClassUtils.java
Sat Oct  6 05:33:55 2007
@@ -43,15 +43,16 @@
      * @return The Method found.
      * @throws NoSuchMethodException
      */
-    public static Method getAssignmentCompatibleMethod( Class clazz,
+    public static Method getAssignmentCompatibleMethod( Class<?> clazz,
                                                         String candidateMethodName,
-                                                        Class[] candidateParameterTypes
+                                                        Class<?>[] candidateParameterTypes
                                                       ) throws NoSuchMethodException
     {
         try
         {
             // Look for exactly the same signature.
             Method exactMethod = clazz.getMethod( candidateMethodName, candidateParameterTypes
);
+            
             if ( exactMethod != null )
             {
                 return exactMethod;
@@ -64,10 +65,10 @@
          * Look for the assignment-compatible signature.
          */
         
-        // Get all methods of the clazz.
+        // Get all methods of the class.
         Method[] methods = clazz.getMethods();
         
-        // For each method of the clazz...
+        // For each method of the class...
         for ( int mx = 0; mx < methods.length; mx++ )
         {
             // If the method name does not match...
@@ -78,7 +79,7 @@
             }
             
             // ... Get parameter types list.
-            Class[] parameterTypes = methods[ mx ].getParameterTypes();
+            Class<?>[] parameterTypes = methods[ mx ].getParameterTypes();
             
             // If parameter types list length mismatch...
             if ( parameterTypes.length != candidateParameterTypes.length )
@@ -103,7 +104,5 @@
         }
         
         throw new NoSuchMethodException( clazz.getName() + "." + candidateMethodName + "("
+ Arrays.toString( candidateParameterTypes ) + ")" );
-        
     }
-
 }



Mime
View raw message