-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
kestrel
-
generic
-
generic
ResourceBundle.getString returns different value than 1.2.2-W w/ 1.3-L
if Locale("","","") is passed to ResourceBundle.getBundle to get ResourceBundle
associated with given property.
Try example code attached under ja locale.
java PropsCheck foo
It returns a pair of message from foo.properties and foo_ja.properties
(Default & Japanese) associated with property key w/ 1.2.2.
This program is to see if there is any missing(new) messages in localized property file no longer work 2/ 1.3.
In 1.2.x, the system returns an instance of ResourceBundle which refers to
default property(in above case, it is foo.properties.) if Locale("","","")
is given as an argument to getBundle of ResourceBundle.
So that 1.2.x allows the application to access explicitly default property file
or property file associated with current locale.
ResourceBundle.getBundle("foo", Locale("","","") -> foo.properties
ResourceBundle.getBundle("foo") -> foo_<LOCALE>.properties -> foo_ja.properties
In 1.3, however, it always access foo_<LOCALE>.properties first even if
Locale("","","") is given to instanciate ResourceBundle in order to
access the message.
if Locale("","","") is passed to ResourceBundle.getBundle to get ResourceBundle
associated with given property.
Try example code attached under ja locale.
java PropsCheck foo
It returns a pair of message from foo.properties and foo_ja.properties
(Default & Japanese) associated with property key w/ 1.2.2.
This program is to see if there is any missing(new) messages in localized property file no longer work 2/ 1.3.
In 1.2.x, the system returns an instance of ResourceBundle which refers to
default property(in above case, it is foo.properties.) if Locale("","","")
is given as an argument to getBundle of ResourceBundle.
So that 1.2.x allows the application to access explicitly default property file
or property file associated with current locale.
ResourceBundle.getBundle("foo", Locale("","","") -> foo.properties
ResourceBundle.getBundle("foo") -> foo_<LOCALE>.properties -> foo_ja.properties
In 1.3, however, it always access foo_<LOCALE>.properties first even if
Locale("","","") is given to instanciate ResourceBundle in order to
access the message.
- relates to
-
JDK-4276840 Regression test :java/util/ResourceBundle/Bug4257318.java failing
-
- Closed
-