You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2009/01/14 16:53:30 UTC
svn commit: r734426 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java
Author: mrglavas
Date: Wed Jan 14 07:53:10 2009
New Revision: 734426
URL: http://svn.apache.org/viewvc?rev=734426&view=rev
Log:
Fixing an NPE that occurs when the Locale is set to null.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java?rev=734426&r1=734425&r2=734426&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xpath/regex/RegexParser.java Wed Jan 14 07:53:10 2009
@@ -89,10 +89,16 @@
public void setLocale(Locale locale) {
try {
- this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message", locale);
- } catch (MissingResourceException mre) {
+ if (locale != null) {
+ this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message", locale);
+ }
+ else {
+ this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message");
+ }
+ }
+ catch (MissingResourceException mre) {
throw new RuntimeException("Installation Problem??? Couldn't load messages: "
- +mre.getMessage());
+ + mre.getMessage());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org