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 2009/11/30 18:14:00 UTC

svn commit: r885502 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java

Author: sebb
Date: Mon Nov 30 17:14:00 2009
New Revision: 885502

URL: http://svn.apache.org/viewvc?rev=885502&view=rev
Log:
Improve type-safety by using parameterized emptySet() method instead of EMPTYSET

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java?rev=885502&r1=885501&r2=885502&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java Mon Nov 30 17:14:00 2009
@@ -692,10 +692,9 @@
          * Produces the cache entry set.
          * @return the cache entry set
          */
-        @SuppressWarnings("unchecked")
         Set<Entry<K, V>> entrySet() {
             Map<K, V> map = ref != null ? ref.get() : null;
-            return map != null ? map.entrySet() : (Set<Entry<K, V>>) Collections.EMPTY_SET;
+            return map != null ? map.entrySet() : Collections.<Entry<K, V>>emptySet();
         }
 
         /**