commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r983903 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
Date Tue, 10 Aug 2010 09:43:34 GMT
Author: sebb
Date: Tue Aug 10 09:43:33 2010
New Revision: 983903

URL: http://svn.apache.org/viewvc?rev=983903&view=rev
Log:
Comment why OK to suppress the warning
Remove unnecessary cast

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java?rev=983903&r1=983902&r2=983903&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java
Tue Aug 10 09:43:33 2010
@@ -268,8 +268,8 @@ public class ConstructorUtils {
          * Class.getConstructors() is documented to return Constructor<T> so as
          * long as the array is not subsequently modified, everything's fine:
          */
-        @SuppressWarnings("unchecked")
-        Constructor<T>[] ctors = (Constructor<T>[]) cls.getConstructors();
+        @SuppressWarnings("unchecked") // cls is of type T
+        Constructor<T>[] ctors = cls.getConstructors();
 
         // return best match:
         for (Constructor<T> ctor : ctors) {



Mime
View raw message