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) {
|