dev@javaserverfaces.java.net

[REVIEW] Minor tweak to ApplicationAssociate.getResourceBundle()

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Fri, 29 Jul 2005 10:24:02 -0700

SECTION: Modified Files
----------------------------
M src/com/sun/faces/application/ApplicationAssociate.java
  - Pass the context classloader to ResourceBundle.getBundle()

M systest/build-tests.xml
A systest/web/golden/resourceBundle04.txt
  - Updated resourceBundle04 to use a goldenfile vs checking for a 500
    from the server as a non-existent key will be displayed as ???KEY???
    rather than an exception.


SECTION: Diffs
----------------------------
Index: src/com/sun/faces/application/ApplicationAssociate.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationAssociate.java,v
retrieving revision 1.16
diff -u -r1.16 ApplicationAssociate.java
--- src/com/sun/faces/application/ApplicationAssociate.java 21 Jul
2005 00:56:39 -0000 1.16
+++ src/com/sun/faces/application/ApplicationAssociate.java 29 Jul
2005 17:19:04 -0000
@@ -335,9 +335,13 @@
         ResourceBundle result = null;
        
         if (null != bean) {
- baseName = (String) bean.getBasename();
+ baseName = bean.getBasename();
             if (null != baseName) {
- result = ResourceBundle.getBundle(baseName, locale);
+ result =
+ ResourceBundle.getBundle(baseName,
+ locale,
+ Thread.currentThread().
+ getContextClassLoader());
             }
         }
         // PENDING(edburns): should cache these based on var/Locale
pair for performance
Index: systest/build-tests.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build-tests.xml,v
retrieving revision 1.84
diff -u -r1.84 build-tests.xml
--- systest/build-tests.xml 26 Jul 2005 14:09:29 -0000 1.84
+++ systest/build-tests.xml 29 Jul 2005 17:19:04 -0000
@@ -766,7 +766,8 @@
          golden="${golden.path}/resourceBundle03.txt"
failonerror="${failonerror}"/>
     <tester host="${host}" port="${port}" protocol="${protocol}"
          request="${context.path}/faces/resourceBundle04.jsp"
- status="500" failonerror="${failonerror}"/>
+ recordGolden="${local.golden.path}/resourceBundle04.txt"
+ golden="${golden.path}/resourceBundle04.txt"
failonerror="${failonerror}"/>
   </target>
 
  


SECTION: New Files
----------------------------
SEE ATTACHMENTS