Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46915
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 26 Mar 2009 14:28:11 +0000 (14:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 26 Mar 2009 14:28:11 +0000 (14:28 +0000)
When resolving ResourceBundle properties, don't claim to have resolved the property unless we really have resolved it.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@758664 13f79535-47bb-0310-9956-ffa450edef68

java/javax/el/ResourceBundleELResolver.java

index b7c5eea..733aec9 100644 (file)
@@ -38,12 +38,12 @@ public class ResourceBundleELResolver extends ELResolver {
                }
                
                if (base instanceof ResourceBundle) {
-                       context.setPropertyResolved(true);
-
                        if (property != null) {
                                try {
-                                       return ((ResourceBundle) base).getObject(property
+                                   Object result = ((ResourceBundle) base).getObject(property
                                                        .toString());
+                           context.setPropertyResolved(true);
+                                   return result;
                                } catch (MissingResourceException mre) {
                                        return "???" + property.toString() + "???";
                                }