commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r892343 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java
Date Fri, 18 Dec 2009 18:44:25 GMT
Author: sebb
Date: Fri Dec 18 18:44:24 2009
New Revision: 892343

URL: http://svn.apache.org/viewvc?rev=892343&view=rev
Log:
LANG-568 - @SuppressWarnings("unchecked") is used too generally

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java?rev=892343&r1=892342&r2=892343&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java Fri Dec 18 18:44:24
2009
@@ -336,10 +336,10 @@
 
         private static final long serialVersionUID = 1L;
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings("unchecked") // Comparator works for all types
         public static final ComparableComparator<?> INSTANCE = new ComparableComparator();
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings("unchecked") // OK to cast, because comparator works for all types
         public static <E extends Comparable<? super E>> ComparableComparator<E>
getInstance() {
             return (ComparableComparator<E>) INSTANCE;
         }



Mime
View raw message