commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1023770 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java
Date Mon, 18 Oct 2010 12:42:41 GMT
Author: sebb
Date: Mon Oct 18 12:42:41 2010
New Revision: 1023770

URL: http://svn.apache.org/viewvc?rev=1023770&view=rev
Log:
Raw types

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java?rev=1023770&r1=1023769&r2=1023770&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java
(original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/SingletonMap.java
Mon Oct 18 12:42:41 2010
@@ -533,7 +533,6 @@ public class SingletonMap<K, V>
      * @return true if equal
      */
     @Override
-    @SuppressWarnings("unchecked")
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -541,11 +540,11 @@ public class SingletonMap<K, V>
         if (obj instanceof Map == false) {
             return false;
         }
-        Map other = (Map) obj;
+        Map<?,?> other = (Map<?,?>) obj;
         if (other.size() != 1) {
             return false;
         }
-        Map.Entry entry = (Map.Entry) other.entrySet().iterator().next();
+        Map.Entry<?,?> entry = other.entrySet().iterator().next();
         return isEqualKey(entry.getKey()) && isEqualValue(entry.getValue());
     }
 



Mime
View raw message