You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2010/02/17 02:52:41 UTC

svn commit: r910796 - /tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java

Author: kkolinko
Date: Wed Feb 17 01:52:41 2010
New Revision: 910796

URL: http://svn.apache.org/viewvc?rev=910796&view=rev
Log:
Fix a bug in ImplicitObjectELResolver.ScopeMap intruduced when applying generics there:
the get(String) and remove(String) methods were not overwriting the ones of AbstractMap,
because those are declared as get(Object) and remove(Object),
thus using ineffective implementations provided by AbstractMap.

Modified:
    tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java

Modified: tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java?rev=910796&r1=910795&r2=910796&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java Wed Feb 17 01:52:41 2010
@@ -561,9 +561,10 @@
 
         }
 
-        public final V get(String key) {
+        @Override
+        public final V get(Object key) {
             if (key != null) {
-                return getAttribute(key);
+                return getAttribute((String) key);
             }
             return null;
         }
@@ -574,18 +575,19 @@
                 throw new NullPointerException();
             }
             if (value == null) {
-                this.removeAttribute(key.toString());
+                this.removeAttribute(key);
             } else {
-                this.setAttribute(key.toString(), value);
+                this.setAttribute(key, value);
             }
             return null;
         }
 
-        public final V remove(String key) {
+        @Override
+        public final V remove(Object key) {
             if (key == null) {
                 throw new NullPointerException();
             }
-            this.removeAttribute(key.toString());
+            this.removeAttribute((String) key);
             return null;
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org