DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38494>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38494

           Summary: [Shale] Messages should log error if resourcebundle not
                    found
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


private ResourceBundle getBundle(Locale locale) {

        assert locale != null;
        ResourceBundle rb = null;
        ClassLoader rbcl = cl;
        if (cl == null) {
            cl = Thread.currentThread().getContextClassLoader();
        }
        synchronized (bundles) {
            rb = (ResourceBundle) bundles.get(locale);
            if (rb == null) {
                try {
                    rb = ResourceBundle.getBundle(name, locale, cl);
                } catch (MissingResourceException e) {
                    rb = ResourceBundle.getBundle(name, defaultLocale, cl);
                }
-               bundles.put(locale, rb);
+               if(rb!=null) {
+                       bundles.put(locale, rb);
+               }
+               else
+               {
+                       Log.warn("Resourcebundle: " + name + " could not be 
found");
+               }
            }
            return rb;
        }

    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to