You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/10/18 14:41:36 UTC

svn commit: r1023768 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java

Author: sebb
Date: Mon Oct 18 12:41:35 2010
New Revision: 1023768

URL: http://svn.apache.org/viewvc?rev=1023768&view=rev
Log:
Unnecessary cast

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

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java?rev=1023768&r1=1023767&r2=1023768&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java Mon Oct 18 12:41:35 2010
@@ -877,7 +877,7 @@ public class MapUtils {
         Map<String, Object> map = new HashMap<String, Object>();
 
         while (enumeration.hasMoreElements()) {
-            String key = (String) enumeration.nextElement();
+            String key = enumeration.nextElement();
             Object value = resourceBundle.getObject(key);
             map.put(key, value);
         }
@@ -1183,8 +1183,7 @@ public class MapUtils {
      * @return true if empty or null
      * @since Commons Collections 3.2
      */
-    @SuppressWarnings("unchecked")
-    public static boolean isEmpty(Map map) {
+    public static boolean isEmpty(Map<?,?> map) {
         return (map == null || map.isEmpty());
     }
 
@@ -1197,8 +1196,7 @@ public class MapUtils {
      * @return true if non-null and non-empty
      * @since Commons Collections 3.2
      */
-    @SuppressWarnings("unchecked")
-    public static boolean isNotEmpty(Map map) {
+    public static boolean isNotEmpty(Map<?,?> map) {
         return !MapUtils.isEmpty(map);
     }