openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1768216 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/src/main/java/org/apach...
Date Sat, 05 Nov 2016 13:46:24 GMT
Author: struberg
Date: Sat Nov  5 13:46:23 2016
New Revision: 1768216

URL: http://svn.apache.org/viewvc?rev=1768216&view=rev
Log:
OPENJPA use Locale.ENGLISH for toLowerCase and toUperCase where possible

* we now use fixed english Locale for 'framework parts' which are by spec portable
* we do NOT yet use a fixed Locale for anything related to column or table names!

txs to Kaloyan Spiridonov for the catch!


Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schemas.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/EmpressDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PointbaseDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MixedLockLevelsHelper.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/ReservedWords.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
Sat Nov  5 13:46:23 2016
@@ -20,6 +20,7 @@ package org.apache.openjpa.jdbc.conf;
 
 import java.sql.Connection;
 import java.sql.ResultSet;
+import java.util.Locale;
 import javax.sql.DataSource;
 
 import org.apache.openjpa.lib.util.StringUtil;
@@ -984,7 +985,7 @@ public class JDBCConfigurationImpl
         // openjpa.someotherimplementation.SomeProperty
         String[] prefixes = ProductDerivations.getConfigurationPrefixes();
         for (int i = 0; i < prefixes.length; i++)
-            if (propName.toLowerCase().startsWith(prefixes[i] + ".jdbc"))
+            if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefixes[i] + ".jdbc"))
                 return true; 
         return false;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java
Sat Nov  5 13:46:23 2016
@@ -21,6 +21,7 @@ package org.apache.openjpa.jdbc.schema;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Properties;
 
 import javax.sql.DataSource;
@@ -110,7 +111,7 @@ extends SimpleDriverDataSource implement
      */
     protected boolean isDBCPDataSource() {
         return (getConnectionDriverName() != null &&
-            getConnectionDriverName().toLowerCase().indexOf(DBCPPACKAGENAME) >= 0);
+            getConnectionDriverName().toLowerCase(Locale.ENGLISH).indexOf(DBCPPACKAGENAME)
>= 0);
     }
     
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
Sat Nov  5 13:46:23 2016
@@ -30,6 +30,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import javax.sql.DataSource;
@@ -572,8 +573,8 @@ public class SchemaGenerator {
             
             // ignore special tables
             if (!_openjpaTables &&
-                (tableName.getName().toUpperCase().startsWith("OPENJPA_")
-                    || tableName.getName().toUpperCase().startsWith("JDO_"))) // legacy
+                (tableName.getName().toUpperCase(Locale.ENGLISH).startsWith("OPENJPA_")
+                    || tableName.getName().toUpperCase(Locale.ENGLISH).startsWith("JDO_")))
// legacy
                 continue;
             if (_dict.isSystemTable(tableName, tableSchema, !DBIdentifier.isNull(schemaName)))
                 continue;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schemas.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schemas.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schemas.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schemas.java Sat
Nov  5 13:46:23 2016
@@ -20,6 +20,7 @@ package org.apache.openjpa.jdbc.schema;
 
 import java.sql.Types;
 import java.util.Date;
+import java.util.Locale;
 
 import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
@@ -188,7 +189,7 @@ public class Schemas {
             return Types.VARBINARY;
         if ("varchar".equalsIgnoreCase(name))
             return Types.VARCHAR;
-        if (name == null || name.toLowerCase().startsWith("unknown"))
+        if (name == null || name.toLowerCase(Locale.ENGLISH).startsWith("unknown"))
             return Types.OTHER;
         throw new IllegalArgumentException("name = " + name);
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Sat Nov  5 13:46:23 2016
@@ -32,6 +32,7 @@ import java.sql.Statement;
 import java.sql.Types;
 import java.util.Arrays;
 import java.util.Date;
+import java.util.Locale;
 import java.util.StringTokenizer;
 
 import javax.sql.DataSource;
@@ -498,7 +499,7 @@ public class DB2Dictionary
             int index = databaseProductVersion.indexOf('V');
             if (index != -1) {
                 String s = databaseProductVersion.substring(index);
-                s = s.toUpperCase();
+                s = s.toUpperCase(Locale.ENGLISH);
 
                 StringTokenizer stringtokenizer = new StringTokenizer(s, "VRM"
                     , false);
@@ -512,7 +513,7 @@ public class DB2Dictionary
                 index = databaseProductVersion.indexOf('0');
                 if (index != -1) {
                     String s = databaseProductVersion.substring(index);
-                    s = s.toUpperCase();
+                    s = s.toUpperCase(Locale.ENGLISH);
 
                     StringTokenizer stringtokenizer = new StringTokenizer(s, "0"
                         , false);                    

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Sat Nov  5 13:46:23 2016
@@ -1838,7 +1838,7 @@ public class DBDictionary
      * subclasses. 
      */
     protected String appendSize(Column col, String typeName) {
-        if (fixedSizeTypeNameSet.contains(typeName.toUpperCase()))
+        if (fixedSizeTypeNameSet.contains(typeName.toUpperCase(Locale.ENGLISH)))
             return typeName;
         if (typeName.indexOf('(') != -1)
             return typeName;
@@ -1891,8 +1891,8 @@ public class DBDictionary
             int curIdx = -1;
             for (Iterator<String> i = typeModifierSet.iterator(); i.hasNext();) {
                 s = i.next();
-                if (typeName.toUpperCase().indexOf(s) != -1) {
-                    curIdx = typeName.toUpperCase().indexOf(s);
+                if (typeName.toUpperCase(Locale.ENGLISH).indexOf(s) != -1) {
+                    curIdx = typeName.toUpperCase(Locale.ENGLISH).indexOf(s);
                     if (curIdx != -1 && curIdx < idx) {
                         idx = curIdx;
                     }
@@ -3335,7 +3335,7 @@ public class DBDictionary
 
         char[] vowels = { 'A', 'E', 'I', 'O', 'U', };
         for (int i = 0; i < vowels.length; i++) {
-            int index = name.toString().toUpperCase().indexOf(vowels[i]);
+            int index = name.toString().toUpperCase(Locale.ENGLISH).indexOf(vowels[i]);
             if (index != -1) {
                 name.replace(index, index + 1, "");
                 return true;
@@ -3715,7 +3715,7 @@ public class DBDictionary
             return null;
 
         String name = toDBName(pk.getIdentifier());
-        if (name != null && reservedWordSet.contains(name.toUpperCase()))
+        if (name != null && reservedWordSet.contains(name.toUpperCase(Locale.ENGLISH)))
             name = null;
 
         StringBuilder buf = new StringBuilder();
@@ -4796,26 +4796,26 @@ public class DBDictionary
 
         // add additional reserved words set by user
         if (reservedWords != null)
-            reservedWordSet.addAll(Arrays.asList(StringUtil.split(reservedWords.toUpperCase(),
",", 0)));
+            reservedWordSet.addAll(Arrays.asList(StringUtil.split(reservedWords.toUpperCase(Locale.ENGLISH),
",", 0)));
 
         // add system schemas set by user
         if (systemSchemas != null)
-            systemSchemaSet.addAll(Arrays.asList(StringUtil.split(systemSchemas.toUpperCase(),
",", 0)));
+            systemSchemaSet.addAll(Arrays.asList(StringUtil.split(systemSchemas.toUpperCase(Locale.ENGLISH),
",", 0)));
 
         // add system tables set by user
         if (systemTables != null)
-            systemTableSet.addAll(Arrays.asList(StringUtil.split(systemTables.toUpperCase(),
",", 0)));
+            systemTableSet.addAll(Arrays.asList(StringUtil.split(systemTables.toUpperCase(Locale.ENGLISH),
",", 0)));
 
         // add fixed size type names set by the user
         if (fixedSizeTypeNames != null)
-            fixedSizeTypeNameSet.addAll(Arrays.asList(StringUtil.split(fixedSizeTypeNames.toUpperCase(),
",", 0)));
+            fixedSizeTypeNameSet.addAll(Arrays.asList(StringUtil.split(fixedSizeTypeNames.toUpperCase(Locale.ENGLISH),
",", 0)));
         
         // if user has unset sequence sql, null it out so we know sequences
         // aren't supported
         nextSequenceQuery = StringUtil.trimToNull(nextSequenceQuery);
         
         if (selectWords != null)
-            selectWordSet.addAll(Arrays.asList(StringUtil.split(selectWords.toUpperCase(),
",", 0)));
+            selectWordSet.addAll(Arrays.asList(StringUtil.split(selectWords.toUpperCase(Locale.ENGLISH),
",", 0)));
         
         // initialize the error codes
         SQLErrorCodeReader codeReader = new SQLErrorCodeReader();
@@ -5703,7 +5703,7 @@ public class DBDictionary
     public void setDateMillisecondBehavior(String str) {
         if (str != null) {
             // Tolerate different case
-            str = str.toUpperCase();
+            str = str.toUpperCase(Locale.ENGLISH);
             dateMillisecondBehavior = DateMillisecondBehaviors.valueOf(str);
         } else {
             dateMillisecondBehavior = null;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
Sat Nov  5 13:46:23 2016
@@ -23,6 +23,7 @@ import java.security.PrivilegedActionExc
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.SQLException;
+import java.util.Locale;
 import java.util.Objects;
 
 import javax.sql.DataSource;
@@ -219,7 +220,7 @@ public class DBDictionaryFactory {
     private static String dictionaryClassForString(String prod, JDBCConfiguration conf) {
         if (StringUtil.isEmpty(prod))
             return null;
-        prod = prod.toLowerCase();
+        prod = prod.toLowerCase(Locale.ENGLISH);
 
         PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf)
             .dbdictionaryPlugin;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/EmpressDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/EmpressDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/EmpressDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/EmpressDictionary.java
Sat Nov  5 13:46:23 2016
@@ -21,6 +21,7 @@ package org.apache.openjpa.jdbc.sql;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.Arrays;
+import java.util.Locale;
 
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -101,7 +102,7 @@ public class EmpressDictionary
     }
 
     public boolean isSystemIndex(String name, Table table) {
-        return name.toUpperCase().startsWith("SYS_");
+        return name.toUpperCase(Locale.ENGLISH).startsWith("SYS_");
     }
 
     public SQLBuffer toSelect(SQLBuffer selects, JDBCFetchConfiguration fetch,

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
Sat Nov  5 13:46:23 2016
@@ -26,6 +26,7 @@ import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Types;
 import java.util.Arrays;
+import java.util.Locale;
 
 import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -250,7 +251,7 @@ public class HSQLDictionary extends DBDi
     }
 
     public boolean isSystemIndex(String name, Table table) {
-        return name.toUpperCase().startsWith("SYS_");
+        return name.toUpperCase(Locale.ENGLISH).startsWith("SYS_");
     }
 
     @Override
@@ -258,7 +259,7 @@ public class HSQLDictionary extends DBDi
         if (DBIdentifier.isNull(name)) {
             return false;
         }
-        return name.getName().toUpperCase().startsWith("SYS_");
+        return name.getName().toUpperCase(Locale.ENGLISH).startsWith("SYS_");
     }
 
     @Override

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Sat Nov  5 13:46:23 2016
@@ -40,6 +40,7 @@ import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -330,7 +331,7 @@ public class OracleDictionary
         if (_driverBehavior != -1)
             return;
 
-        driverVendor = driverVendor.toLowerCase();
+        driverVendor = driverVendor.toLowerCase(Locale.ENGLISH);
         if (driverVendor.startsWith(VENDOR_ORACLE))
             _driverBehavior = BEHAVE_ORACLE;
         else if (driverVendor.equals(VENDOR_DATADIRECT + "30")
@@ -566,9 +567,9 @@ public class OracleDictionary
         // sqlj_jdbc/files/9i_jdbc/NCHARsupport4UnicodeSample/Readme.html
         String typeName = (col == null) ? null : col.getTypeIdentifier().getName();
         if (useSetFormOfUseForUnicode && typeName != null &&
-            (typeName.toLowerCase().startsWith("nvarchar") ||
-                typeName.toLowerCase().startsWith("nchar") ||
-                typeName.toLowerCase().startsWith("nclob"))) {
+            (typeName.toLowerCase(Locale.ENGLISH).startsWith("nvarchar") ||
+                typeName.toLowerCase(Locale.ENGLISH).startsWith("nchar") ||
+                typeName.toLowerCase(Locale.ENGLISH).startsWith("nclob"))) {
             Statement inner = stmnt;
             if (inner instanceof DelegatingPreparedStatement)
                 inner = ((DelegatingPreparedStatement) inner).
@@ -791,7 +792,7 @@ public class OracleDictionary
             String typeName = cols[i].getTypeIdentifier().getName();
             if (typeName == null)
                 continue;
-            if (typeName.toUpperCase().startsWith("TIMESTAMP"))
+            if (typeName.toUpperCase(Locale.ENGLISH).startsWith("TIMESTAMP"))
                 cols[i].setType(Types.TIMESTAMP);
             else if ("BLOB".equalsIgnoreCase(typeName))
                 cols[i].setType(Types.BLOB);
@@ -1117,7 +1118,7 @@ public class OracleDictionary
         return (autoAssignSequenceName != null
             && strName.equalsIgnoreCase(autoAssignSequenceName))
             || (autoAssignSequenceName == null
-            && strName.toUpperCase().startsWith("ST_"));
+            && strName.toUpperCase(Locale.ENGLISH).startsWith("ST_"));
     }
 
     @Override

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PointbaseDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PointbaseDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PointbaseDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PointbaseDictionary.java
Sat Nov  5 13:46:23 2016
@@ -22,6 +22,7 @@ import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.SQLException;
 import java.sql.Types;
+import java.util.Locale;
 
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
@@ -95,7 +96,7 @@ public class PointbaseDictionary
 
         // pointbase reports the type for a CLOB field as VARCHAR: override it
         for (int i = 0; cols != null && i < cols.length; i++)
-            if (cols[i].getTypeIdentifier().getName().toUpperCase().startsWith("CLOB"))
+            if (cols[i].getTypeIdentifier().getName().toUpperCase(Locale.ENGLISH).startsWith("CLOB"))
                 cols[i].setType(Types.CLOB);
         return cols;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
Sat Nov  5 13:46:23 2016
@@ -37,6 +37,7 @@ import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -204,7 +205,7 @@ public class PostgresDictionary
         
         _timestampTypes.add("ABSTIME");
         _timestampTypes.add("TIMESTAMP");
-        _timestampTypes.add(timestampTypeName.toUpperCase()); // handle user configured timestamp
types.
+        _timestampTypes.add(timestampTypeName.toUpperCase(Locale.ENGLISH)); // handle user
configured timestamp types.
     }
 
     @Override
@@ -383,7 +384,7 @@ public class PostgresDictionary
         
         String strName = DBIdentifier.isNull(name) ? "" : name.getName();
         // basic check for SEQ suffix.  not SEQ, not an owned sequence
-        if (strName == null || !strName.toUpperCase().endsWith("_SEQ"))
+        if (strName == null || !strName.toUpperCase(Locale.ENGLISH).endsWith("_SEQ"))
             return false;
 
         // If no connection, use secondary method to determine ownership
@@ -534,7 +535,7 @@ public class PostgresDictionary
         // of the form <table>_<col>_seq
         int idx = (strName == null) ? -1 : strName.indexOf('_');
         return idx != -1 && idx != strName.length() - 4
-            && strName.toUpperCase().endsWith("_SEQ");
+            && strName.toUpperCase(Locale.ENGLISH).endsWith("_SEQ");
     }
 
     public boolean isSystemTable(String name, String schema,
@@ -547,7 +548,7 @@ public class PostgresDictionary
         // names starting with "pg_" are reserved for Postgresql internal use
         String strName = DBIdentifier.isNull(name) ? null : name.getName();
         return super.isSystemTable(name, schema, targetSchema)
-            || (strName != null && strName.toLowerCase().startsWith("pg_"));
+            || (strName != null && strName.toLowerCase(Locale.ENGLISH).startsWith("pg_"));
     }
 
     public boolean isSystemIndex(String name, Table table) {
@@ -558,7 +559,7 @@ public class PostgresDictionary
         // names starting with "pg_" are reserved for Postgresql internal use
         String strName = DBIdentifier.isNull(name) ? null : name.getName();
         return super.isSystemIndex(name, table)
-            || (strName != null && strName.toLowerCase().startsWith("pg_"));
+            || (strName != null && strName.toLowerCase(Locale.ENGLISH).startsWith("pg_"));
     }
 
     public Connection decorate(Connection conn)
@@ -779,7 +780,7 @@ public class PostgresDictionary
             try {
                 Method m = obj.getClass().getMethod("getType", (Class[]) null);
                 Object type = m.invoke(obj, (Object[]) null);
-                if(_timestampTypes.contains(((String) type).toUpperCase())) { 
+                if(_timestampTypes.contains(((String) type).toUpperCase(Locale.ENGLISH)))
{
                     return rs.getTimestamp(column);
                 }
             } catch (Throwable t) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java
Sat Nov  5 13:46:23 2016
@@ -25,6 +25,7 @@ import java.sql.DatabaseMetaData;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
+import java.util.Locale;
 
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.kernel.JDBCStore;
@@ -132,7 +133,7 @@ public class SQLServerDictionary extends
         if (((VENDOR_MICROSOFT.equalsIgnoreCase(driverVendor) &&
             requiresWarnings) || 
             VENDOR_DATADIRECT.equalsIgnoreCase(driverVendor)) &&
-            (url.toLowerCase().indexOf("selectmethod=cursor") == -1))
+            (url.toLowerCase(Locale.ENGLISH).indexOf("selectmethod=cursor") == -1))
             log.warn(_loc.get("sqlserver-cursor", url));
 
         // warn about prepared statement caching if using pre-2.0 MS drivers
@@ -141,7 +142,7 @@ public class SQLServerDictionary extends
         if ((props != null) &&
             VENDOR_MICROSOFT.equalsIgnoreCase(driverVendor) &&
             requiresWarnings &&
-            (props.toLowerCase().indexOf("maxcachedstatements=0") == -1))
+            (props.toLowerCase(Locale.ENGLISH).indexOf("maxcachedstatements=0") == -1))
             log.warn(_loc.get("sqlserver-cachedstmnts"));
     }
 
@@ -168,7 +169,7 @@ public class SQLServerDictionary extends
             if (typeName == null)
                 continue;
 
-            typeName = typeName.toUpperCase();
+            typeName = typeName.toUpperCase(Locale.ENGLISH);
             if ("NVARCHAR".equals(typeName))
                 cols[i].setType(Types.VARCHAR);
             else if ("UNIQUEIDENTIFIER".equals(typeName)) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
Sat Nov  5 13:46:23 2016
@@ -26,6 +26,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
 import java.util.Arrays;
+import java.util.Locale;
 
 import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
@@ -289,8 +290,8 @@ public class SybaseDictionary
         // warn about jdbc compliant flag
         String url = conf.getConnectionURL();
         if (!StringUtil.isEmpty(url)
-            && url.toLowerCase().indexOf("jdbc:sybase:tds") != -1
-            && url.toLowerCase().indexOf("be_as_jdbc_compliant_as_possible=")
+            && url.toLowerCase(Locale.ENGLISH).indexOf("jdbc:sybase:tds") != -1
+            && url.toLowerCase(Locale.ENGLISH).indexOf("be_as_jdbc_compliant_as_possible=")
             == -1) {
             log.warn(_loc.get("sybase-compliance", url));
         }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java
Sat Nov  5 13:46:23 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.openjpa.conf;
 
+import java.util.Locale;
 import java.util.Objects;
 
 import org.apache.openjpa.lib.util.Localizer;
@@ -126,7 +127,7 @@ public class Specification {
     }
     
     public String toString() {
-        return _name.toUpperCase() + " " + _major + "." + _minor;
+        return _name.toUpperCase(Locale.ENGLISH) + " " + _major + "." + _minor;
     }
     
     private Object[] parse(String str) {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java
Sat Nov  5 13:46:23 2016
@@ -31,6 +31,7 @@ import java.net.URLClassLoader;
 import java.security.AccessController;
 import java.security.CodeSource;
 import java.security.PrivilegedAction;
+import java.util.Locale;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
@@ -200,7 +201,7 @@ public class InstrumentationFactory {
                             toolsJarFile.getAbsolutePath());
                     }
                 }
-            } else if (System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0)
{
+            } else if (System.getProperty("os.name").toLowerCase(Locale.ENGLISH).indexOf("mac")
>= 0) {
                 // If we're on a Mac, then change the search path to use ../Classes/classes.jar.
                 if (javaHomeFile.getAbsolutePath().endsWith(File.separator + "Home") == true)
{
                     javaHomeFile = javaHomeFile.getParentFile();

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
Sat Nov  5 13:46:23 2016
@@ -48,6 +48,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.Objects;
@@ -848,7 +849,7 @@ public class ConfigurationImpl
         // specific implementation of OpenJPA
         String[] prefixes = ProductDerivations.getConfigurationPrefixes();
         for (String prefix : prefixes) {
-            if (propName.toLowerCase().startsWith(prefix)
+            if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefix)
                 && propName.length() > prefix.length() + 1
                 && propName.indexOf('.', prefix.length()) == prefix.length()
                 && propName.indexOf('.', prefix.length() + 1) == -1

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
Sat Nov  5 13:46:23 2016
@@ -19,6 +19,7 @@
 package org.apache.openjpa.lib.identifier;
 
 import java.util.ArrayList;
+import java.util.Locale;
 
 import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.lib.conf.Configurable;
@@ -368,7 +369,7 @@ public class IdentifierUtilImpl implemen
             return false;
         }
         if (!isDelimited(rule, name)) {
-            name = name.toUpperCase();
+            name = name.toUpperCase(Locale.ENGLISH);
         }
         return rule.getReservedWords().contains(name);
     }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java (original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java Sat
Nov  5 13:46:23 2016
@@ -19,6 +19,7 @@
 package org.apache.openjpa.lib.util;
 
 import java.security.AccessController;
+import java.util.Locale;
 
 /**
  * Utilities for dealing with different Java vendors.
@@ -30,7 +31,7 @@ public enum JavaVendors {
 
     static {
         String vendor =
-            AccessController.doPrivileged(J2DoPrivHelper.getPropertyAction("java.vendor",
"")).toUpperCase();
+            AccessController.doPrivileged(J2DoPrivHelper.getPropertyAction("java.vendor",
"")).toUpperCase(Locale.ENGLISH);
         if (vendor.contains("SUN MICROSYSTEMS")) {
             _vendor = SUN;
         } else if (vendor.contains("IBM")) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
Sat Nov  5 13:46:23 2016
@@ -30,6 +30,7 @@ import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -106,7 +107,7 @@ public class TestEmbeddable extends SQLL
             EntityA_Embed_Complex.class, A.class, CLEAR_TABLES);
             sql.clear();
             DBDictionary dict = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
-            if (dict.getClass().getName().toLowerCase().indexOf("oracle") != -1) {
+            if (dict.getClass().getName().toLowerCase(Locale.ENGLISH).indexOf("oracle") !=
-1) {
                 ((OracleDictionary)dict).useTriggersForAutoAssign = true;
             }
     }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
Sat Nov  5 13:46:23 2016
@@ -19,6 +19,7 @@
 package org.apache.openjpa.persistence;
 
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.persistence.CacheRetrieveMode;
@@ -129,9 +130,9 @@ public class JPAProperties {
         if (JPAProperties.isValidKey(key)) {
             // works because enum values are identical String
             if (value instanceof CacheRetrieveMode || (value instanceof String &&
CACHE_RETRIEVE_MODE.equals(key))) {
-                return (T)DataCacheRetrieveMode.valueOf(value.toString().trim().toUpperCase());
+                return (T)DataCacheRetrieveMode.valueOf(value.toString().trim().toUpperCase(Locale.ENGLISH));
             } else if (value instanceof CacheStoreMode || (value instanceof String &&
CACHE_STORE_MODE.equals(key))) {
-                return (T)DataCacheStoreMode.valueOf(value.toString().trim().toUpperCase());
+                return (T)DataCacheStoreMode.valueOf(value.toString().trim().toUpperCase(Locale.ENGLISH));
             }
         }
         return (T)value;
@@ -148,9 +149,9 @@ public class JPAProperties {
         if (JPAProperties.isValidKey(key)) {
             // works because enum values are identical String
             if (value instanceof DataCacheRetrieveMode) {
-                return CacheRetrieveMode.valueOf(value.toString().trim().toUpperCase());
+                return CacheRetrieveMode.valueOf(value.toString().trim().toUpperCase(Locale.ENGLISH));
             } else if (value instanceof DataCacheStoreMode) {
-                return CacheStoreMode.valueOf(value.toString().trim().toUpperCase());
+                return CacheStoreMode.valueOf(value.toString().trim().toUpperCase(Locale.ENGLISH));
             }
         }
         return value;
@@ -202,7 +203,7 @@ public class JPAProperties {
         if (type.isInstance(val))
             return (E)val;
         if (val instanceof String) {
-            return Enum.valueOf(type, val.toString().trim().toUpperCase());
+            return Enum.valueOf(type, val.toString().trim().toUpperCase(Locale.ENGLISH));
         }
         if (values != null && values.length > 0 && val instanceof Number)
{
             return values[((Number)val).intValue()];

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MixedLockLevelsHelper.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MixedLockLevelsHelper.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MixedLockLevelsHelper.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MixedLockLevelsHelper.java
Sat Nov  5 13:46:23 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.openjpa.persistence;
 
+import java.util.Locale;
 import javax.persistence.LockModeType;
 
 import org.apache.openjpa.kernel.FetchConfiguration;
@@ -107,7 +108,7 @@ public class MixedLockLevelsHelper imple
                     return MixedLockLevels.LOCK_NONE;
                 }
                 return MixedLockLevelsHelper.toLockLevel(
-                        LockModeType.valueOf(original.toString().toUpperCase().replace('-',
'_')));
+                        LockModeType.valueOf(original.toString().toUpperCase(Locale.ENGLISH).replace('-',
'_')));
             }
         }
         if (original instanceof Integer) {

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
Sat Nov  5 13:46:23 2016
@@ -34,6 +34,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Locale;
 
 import javax.persistence.Access;
 import javax.persistence.AccessType;
@@ -238,9 +239,9 @@ public class PersistenceMetaDataDefaults
      * with ACCESS_UNKNOWN
      */
     public void setDefaultAccessType(String type) {
-        if ("PROPERTY".equals(type.toUpperCase()))
+        if ("PROPERTY".equals(type.toUpperCase(Locale.ENGLISH)))
             setDefaultAccessType(AccessCode.PROPERTY);
-        else if ("FIELD".equals(type.toUpperCase()))
+        else if ("FIELD".equals(type.toUpperCase(Locale.ENGLISH)))
             setDefaultAccessType(AccessCode.FIELD);
         else
         	throw new IllegalArgumentException(_loc.get("access-invalid", 

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
Sat Nov  5 13:46:23 2016
@@ -32,6 +32,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.Set;
@@ -242,11 +243,11 @@ public class PersistenceProductDerivatio
         conf.validationMode.setDynamic(true);
         String[] aliases = new String[] {
                 String.valueOf(ValidationMode.AUTO),
-                String.valueOf(ValidationMode.AUTO).toLowerCase(),
+                String.valueOf(ValidationMode.AUTO).toLowerCase(Locale.ENGLISH),
                 String.valueOf(ValidationMode.CALLBACK),
-                String.valueOf(ValidationMode.CALLBACK).toLowerCase(),
+                String.valueOf(ValidationMode.CALLBACK).toLowerCase(Locale.ENGLISH),
                 String.valueOf(ValidationMode.NONE),
-                String.valueOf(ValidationMode.NONE).toLowerCase()
+                String.valueOf(ValidationMode.NONE).toLowerCase(Locale.ENGLISH)
         };
         conf.validationMode.setAliases(aliases);
         conf.validationMode.setAliasListComprehensive(true);

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/ReservedWords.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/ReservedWords.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/ReservedWords.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/ReservedWords.java
Sat Nov  5 13:46:23 2016
@@ -2,6 +2,7 @@ package org.apache.openjpa.persistence.u
 
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Set;
 
 /*
@@ -62,7 +63,7 @@ public class ReservedWords {
      * Affirms if the given string matches any of the JPA reserved words in a case-insensitive
manner.
      */
     public static boolean isKeyword(String name) {
-        return name != null && KEYWORDS.contains(name.toUpperCase());
+        return name != null && KEYWORDS.contains(name.toUpperCase(Locale.ENGLISH));
     }
     
     /**

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java?rev=1768216&r1=1768215&r2=1768216&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java
Sat Nov  5 13:46:23 2016
@@ -348,7 +348,7 @@ public class SourceCode {
 				a.write(out, tab);
 			tab(out, tab);
 			if (access != null) 
-			    out.append(access.toString().toLowerCase() + SPACE);
+			    out.append(access.toString().toLowerCase(Locale.ENGLISH) + SPACE);
 			if (isStatic) 
 			    out.append("static" + SPACE);
 			if (isFinal) 




Mime
View raw message