Comments (10)
- Issue Imported From: https://github.com/javaserverfaces/mojarra/issues/12
- Original Issue Raised By:@javaserverfaces
- Original Issue Assigned To: @glassfishrobot
- Original Issue Closed By:@javaserverfaces
from mojarra.
@javaserverfaces Commented
Reported by @rlubke
from mojarra.
@javaserverfaces Commented
@rlubke said:
Taking ownership of issue.
from mojarra.
@javaserverfaces Commented
@rlubke said:
Change bundle for proposed fix:
SECTION: Modified Files
M src/com/sun/faces/application/ApplicationImpl.java
- getDefaultLocale() must return null if not locale has been
explicitly set.
M src/com/sun/faces/application/ViewHandlerImpl.java
- Take into account the above that getDefaultLocale() may
return null.
M src/com/sun/faces/config/ConfigureListener.java
- Center point of the bug. The logic that set the default locale
would have only been called if tracing was active...this has
been adjusted.
M test/com/sun/faces/application/TestApplicationImpl_Config.java
- Ensure the default locale of en_US
SECTION: Diffs
Index: src/com/sun/faces/application/ApplicationImpl.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationImpl.java,v
retrieving revision 1.50
diff -u -r1.50 ApplicationImpl.java
— src/com/sun/faces/application/ApplicationImpl.java 10 May 2004 19:55:59
-0000 1.50
+++ src/com/sun/faces/application/ApplicationImpl.java 14 Jul 2004 20:02:39 -0000
@@ -574,16 +574,7 @@
public Locale getDefaultLocale() {
- Locale result = defaultLocale;
- synchronized (this) {
- if (null == defaultLocale) { - result = Locale.getDefault(); - }
- }
- if (log.isTraceEnabled()) { - log.trace("get defaultLocale " + result); - }
- return result;
- return defaultLocale;
}
- return defaultLocale;
Index: src/com/sun/faces/application/ViewHandlerImpl.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java,v
retrieving revision 1.41
diff -u -r1.41 ViewHandlerImpl.java
— src/com/sun/faces/application/ViewHandlerImpl.java 10 May 2004 19:56:00
-0000 1.41
+++ src/com/sun/faces/application/ViewHandlerImpl.java 14 Jul 2004 20:02:40 -0000
@@ -397,6 +397,7 @@
// if it's not in the supported locales,
if (null == result) {
Locale defaultLocale = context.getApplication().getDefaultLocale();
- if (defaultLocale != null) {
if ( perf.equals(defaultLocale))
{ // exact match result = defaultLocale; @@ -411,6 +412,7 @@ result = defaultLocale; }
}
- }
}
return result;
Index: src/com/sun/faces/config/ConfigureListener.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ConfigureListener.java,v
retrieving revision 1.20
diff -u -r1.20 ConfigureListener.java
— src/com/sun/faces/config/ConfigureListener.java 4 Jun 2004 20:48:01 -0000
1.20
+++ src/com/sun/faces/config/ConfigureListener.java 14 Jul 2004 20:02:41 -0000
@@ -760,12 +760,10 @@
value = config.getDefaultLocale();
if (value != null) {
if (log.isTraceEnabled()) {
- if (log.isTraceEnabled()) { - log.trace("setDefaultLocale(" + value + ")"); - }
- application.setDefaultLocale
- (Util.getLocaleFromString(value));
- log.trace("setDefaultLocale(" + value + ")");
} - application.setDefaultLocale
- (Util.getLocaleFromString(value));
}
- log.trace("setDefaultLocale(" + value + ")");
values = config.getSupportedLocales();
Index: test/com/sun/faces/application/TestApplicationImpl_Config.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/application/TestApplicationImpl_Config.java,v
retrieving revision 1.34
diff -u -r1.34 TestApplicationImpl_Config.java
— test/com/sun/faces/application/TestApplicationImpl_Config.java 15 Jun
2004 21:03:39 -0000 1.34
+++ test/com/sun/faces/application/TestApplicationImpl_Config.java 14 Jul
2004 20:02:44 -0000
@@ -412,7 +412,7 @@
application.addValidator("Billybob",
"javax.faces.validator.LengthValidator");
- assertTrue(null != (newTestValidator = (Validator)
- assertTrue(null != (newTestValidator =
application.createValidator("Billybob")));
assertTrue(newTestValidator != testValidator);
- assertTrue(null != (newTestValidator =
@@ -526,8 +526,7 @@
assertNotNull("Can't get default locale from Application",
locale = application.getDefaultLocale());
- Locale defaultLocale = Locale.getDefault();
- assertEquals(locale, defaultLocale); +
assertEquals(Locale.US, locale);
Iterator iter;
int j = 0, len = 0;
from mojarra.
@javaserverfaces Commented
@edburns said:
Looks good, r=edburns
from mojarra.
@javaserverfaces Commented
@rlubke said:
Patch applied. Unit tests pass. Marking as fixed.
from mojarra.
@javaserverfaces Commented
@manfredriem said:
Closing issue out
from mojarra.
@javaserverfaces Commented
Was assigned to rlubke
from mojarra.
@javaserverfaces Commented
This issue was imported from java.net JIRA JAVASERVERFACES-8
from mojarra.
@javaserverfaces Commented
Marked as fixed on Wednesday, April 19th 2006, 5:44:32 am
from mojarra.
Related Issues (20)
- Dynamic actions not correctly processed HOT 12
- FaceletViewHandlingStrategy handleRenderException log exception before rethrow
- class-level bean validation: Array data not copied after bean cloning HOT 2
- Remove dependencies on SOAP web servcies HOT 5
- Programmatic View with UIOutput HOT 2
- Duplicate `<changes>` entry in PrimeFaces PartialResponseWriter HOT 7
- Revert #5157 HOT 13
- Revert or fix #5417 and release a new 4.0.x version HOT 1
- Static variables in ELUtils cause memory leaks and leaks of resolver cache between applications HOT 1
- U+FFFE and U+FFFF characters can block JSF applications by rendered as ajax response HOT 1
- HtmlUtils#writeAttribute must follow same rules as HtmlUtils#writeUnescapedTextForXML when writing for partial response
- SearchExpressionResolver: `@id` always uses visitTree ?
- 5.0: Unify NavigationHandler and ConfigurableNavigationHandler
- 5.0 Utilize ability to pass VisitHints to UIViewRoot#resetValues()
- 5.0: FacesMessage.Severity will be migrated to enum HOT 1
- 5.0: PhaseId will be migrated to enum HOT 1
- Support new resolvers from Expression Language 6 HOT 1
- cc:attribute elements that have a "default" attribute can not be accessed in FacesComponent HOT 3
- Webapp fails to start with jakarta.faces.AUTOMATIC_EXTENSIONLESS_MAPPING set to true HOT 3
- Bug: API References Implementation Class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojarra.