[jboss-cvs] JBossCache/src/org/jboss/cache/config ...
Elias Ross
genman at noderunner.net
Wed Jan 31 17:51:16 EST 2007
User: genman
Date: 07/01/31 17:51:16
Modified: src/org/jboss/cache/config Configuration.java
Log:
JIRA-693 - Fix Locale issues
Revision Changes Path
1.40 +9 -3 JBossCache/src/org/jboss/cache/config/Configuration.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Configuration.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Configuration.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- Configuration.java 30 Jan 2007 21:34:25 -0000 1.39
+++ Configuration.java 31 Jan 2007 22:51:16 -0000 1.40
@@ -6,6 +6,8 @@
*/
package org.jboss.cache.config;
+import java.util.Locale;
+
import org.jboss.cache.CacheImpl;
import org.jboss.cache.Version;
import org.jboss.cache.factories.XmlConfigurationParser;
@@ -212,7 +214,7 @@
{
testImmutability("cacheMode");
if (cacheMode == null) throw new ConfigurationException("Cache mode cannot be null", "CacheMode");
- this.cacheMode = CacheMode.valueOf(cacheMode.toUpperCase());
+ this.cacheMode = CacheMode.valueOf(uc(cacheMode));
if (this.cacheMode == null)
{
log.warn("Unknown cache mode '" + cacheMode + "', using defaults.");
@@ -325,7 +327,7 @@
{
throw new ConfigurationException("Node locking scheme cannot be null", "NodeLockingScheme");
}
- this.nodeLockingScheme = NodeLockingScheme.valueOf(nodeLockingScheme.toUpperCase());
+ this.nodeLockingScheme = NodeLockingScheme.valueOf(uc(nodeLockingScheme));
if (this.nodeLockingScheme == null)
{
log.warn("Unknown node locking scheme '" + nodeLockingScheme + "', using defaults.");
@@ -345,11 +347,15 @@
setNodeLockingScheme(nodeLockingScheme);
}
+ private static String uc(String s) {
+ return s.toUpperCase(Locale.ENGLISH);
+ }
+
public void setIsolationLevel(String isolationLevel)
{
testImmutability("isolationLevel");
if (isolationLevel == null) throw new ConfigurationException("Isolation level cannot be null", "IsolationLevel");
- this.isolationLevel = IsolationLevel.valueOf(isolationLevel.toUpperCase());
+ this.isolationLevel = IsolationLevel.valueOf(uc(isolationLevel));
if (this.isolationLevel == null)
{
log.warn("Unknown isolation level '" + isolationLevel + "', using defaults.");
More information about the jboss-cvs-commits
mailing list