- Fix improper caching by checking the class definition.
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 20 Apr 2006 12:46:25 +0000 (12:46 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 20 Apr 2006 12:46:25 +0000 (12:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@395575 13f79535-47bb-0310-9956-ffa450edef68

java/javax/el/BeanELResolver.java

index b947083..7a05331 100644 (file)
@@ -194,6 +194,10 @@ public class BeanELResolver extends ELResolver {
                        }\r
                        return property;\r
                }\r
+        \r
+        public Class<?> getType() {\r
+            return type;\r
+        }\r
        }\r
 \r
        private final static class BeanProperty {\r
@@ -253,7 +257,7 @@ public class BeanELResolver extends ELResolver {
                String prop = property.toString();\r
 \r
                BeanProperties props = this.cache.get(type.getName());\r
-               if (props == null) {\r
+               if (props == null || type != props.getType()) {\r
                        props = new BeanProperties(type);\r
                        this.cache.put(type.getName(), props);\r
                }\r