openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1759663 [1/4] - in /openjpa/trunk: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/ openjpa-jdbc/src/main/jav...
Date Wed, 07 Sep 2016 19:04:20 GMT
Author: struberg
Date: Wed Sep  7 19:04:18 2016
New Revision: 1759663

URL: http://svn.apache.org/viewvc?rev=1759663&view=rev
Log:
OPENJPA-2665 refactor StringUtils

We now got rid of commons-lang. Makes 400kB less dependencies 
And guaranteed no classpath conflicts.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java
    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/conf/MappingFactoryValue.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifier.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifierUtilImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/PropertiesReverseCustomizer.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/SequenceMapping.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MultiColumnVersionStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/NameSet.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.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/schema/XMLSchemaSerializer.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/H2Dictionary.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/MariaDBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.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/OpenJPAConfigurationImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Specification.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCSubclassValidator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/Reflection.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/MethodStoreQuery.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ResultPacker.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/Extensions.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InterfaceImplGenerator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/QueryMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/XMLClassMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/XMLFieldMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/StringId.java
    openjpa/trunk/openjpa-lib/pom.xml
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.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/conf/Configurations.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/DoubleValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/IntValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/StringListValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/StringValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Value.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierRule.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/meta/CFMetaDataParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Files.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/StringUtil.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/xml/TestXMLWriter.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingSerializer.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/strats/AbstractLobTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestBeforeCommit.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationBuilder.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.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/PersistenceProductDerivation.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java
    openjpa/trunk/openjpa-tools/openjpa-fetch-statistics/src/main/java/org/apache/openjpa/enhance/stats/FetchStatisticsAuxEnhancer.java
    openjpa/trunk/pom.xml

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java Wed Sep  7 19:04:18 2016
@@ -25,7 +25,7 @@ import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.util.Properties;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
 import org.apache.openjpa.jdbc.meta.PropertiesReverseCustomizer;
@@ -262,9 +262,9 @@ public class ReverseMappingToolTask
     protected void executeOn(String[] files)
         throws Exception {
         ClassLoader loader = getClassLoader();
-        if (!StringUtils.isEmpty(dirName))
+        if (!StringUtil.isEmpty(dirName))
             flags.directory = Files.getFile(dirName, loader);
-        if (!StringUtils.isEmpty(typeMap))
+        if (!StringUtil.isEmpty(typeMap))
             flags.typeMap = Configurations.parseProperties(typeMap);
 
         // load customizer properties

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -22,7 +22,7 @@ import java.sql.Connection;
 import java.sql.ResultSet;
 import javax.sql.DataSource;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
 import org.apache.openjpa.jdbc.identifier.DBIdentifierUtil;
 import org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager;
@@ -575,7 +575,7 @@ public class JDBCConfigurationImpl
         if (dbdictionary == null) {
             String clsName = dbdictionaryPlugin.getClassName();
             String props = dbdictionaryPlugin.getProperties();
-            if (!StringUtils.isEmpty(clsName)) {
+            if (!StringUtil.isEmpty(clsName)) {
                 dbdictionary = DBDictionaryFactory.newDBDictionary
                     (this, clsName, props);
             } else {
@@ -798,7 +798,7 @@ public class JDBCConfigurationImpl
                 // the driver name is always required, so if not specified,
                 // then no connection factory 2
                 String driver = getConnection2DriverName();
-                if (!StringUtils.isEmpty(driver))
+                if (!StringUtil.isEmpty(driver))
                     ds = DataSourceFactory.newDataSource(this, true);
             }
             if (ds != null) {
@@ -859,7 +859,7 @@ public class JDBCConfigurationImpl
         Log log = getLog(LOG_RUNTIME);
         DataSource ds = null;
         
-        if(ctx != null && StringUtils.isNotEmpty(ctx.getConnectionFactoryName())) {
+        if(ctx != null && StringUtil.isNotEmpty(ctx.getConnectionFactoryName())) {
             ds =  getDataSource(ctx, (DataSource) ctx.getConnectionFactory()); 
             // fail fast if a cfName has been provided, but was not available in JNDI
             if (ds == null) {
@@ -888,7 +888,7 @@ public class JDBCConfigurationImpl
         DataSource ds = null;
 
         // Try to obtain from the StoreContext first.
-        if (ctx != null && StringUtils.isNotEmpty(ctx.getConnectionFactory2Name())) {
+        if (ctx != null && StringUtil.isNotEmpty(ctx.getConnectionFactory2Name())) {
             ds = (DataSource) ctx.getConnectionFactory2();
             if (ds == null) {
                 // fail fast. If the non-jta-data-source is configured on the context we want an immediate error. 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java Wed Sep  7 19:04:18 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.openjpa.jdbc.conf;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.jdbc.meta.MetaDataPlusMappingFactory;
 import org.apache.openjpa.lib.conf.Configuration;
@@ -91,15 +91,15 @@ public class MappingFactoryValue
         String metaProps = metaPlugin.getProperties();
 
         // if no mapping factory set, check for default for this factory
-        if (StringUtils.isEmpty(clsName)) {
+        if (StringUtil.isEmpty(clsName)) {
             String def;
-            if (!StringUtils.isEmpty(mapping)) {
+            if (!StringUtil.isEmpty(mapping)) {
                 def = unalias(metaPlugin.alias(metaClsName),
                     _mappedMetaFactoryDefaults, true);
                 if (def != null)
                     clsName = unalias(def);
             }
-            if (StringUtils.isEmpty(clsName)) {
+            if (StringUtil.isEmpty(clsName)) {
                 def = unalias(metaPlugin.alias(metaClsName),
                     _metaFactoryDefaults, true);
                 if (def != null)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifier.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifier.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifier.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifier.java Wed Sep  7 19:04:18 2016
@@ -20,7 +20,7 @@ package org.apache.openjpa.jdbc.identifi
 
 import java.io.Serializable;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.lib.identifier.Identifier;
 import org.apache.openjpa.lib.identifier.IdentifierImpl;
 
@@ -300,7 +300,7 @@ public class DBIdentifier extends Identi
         if (isNull(name)) {
             return true;
         }
-        return StringUtils.isEmpty(name.getName());
+        return StringUtil.isEmpty(name.getName());
     }
 
     
@@ -350,7 +350,7 @@ public class DBIdentifier extends Identi
             return name;
         }
         DBIdentifier sName = name.clone();
-        sName.setNameInternal(StringUtils.trimToNull(sName.getNameInternal()));
+        sName.setNameInternal(StringUtil.trimToNull(sName.getNameInternal()));
         return sName;
     }
 
@@ -666,7 +666,7 @@ public class DBIdentifier extends Identi
     public static DBIdentifier truncate(DBIdentifier name, int length) {
         DBIdentifier sName = name.clone();
         String strName = sName.getNameInternal();
-        if (StringUtils.isEmpty(strName)) {
+        if (StringUtil.isEmpty(strName)) {
             return sName;
         }
         strName = Normalizer.truncate(strName, length);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifierUtilImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifierUtilImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifierUtilImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/DBIdentifierUtilImpl.java Wed Sep  7 19:04:18 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.openjpa.jdbc.identifier;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -451,7 +451,7 @@ public class DBIdentifierUtilImpl extend
 
     private DBIdentifier makeName(String rule, DBIdentifier name, String prefix) {
         DBIdentifier sName = DBIdentifier.removeLeading(name, IdentifierUtil.UNDERSCORE);
-        if (!StringUtils.isEmpty(prefix)) {
+        if (!StringUtil.isEmpty(prefix)) {
             sName = DBIdentifier.preCombine(sName, prefix);
         }
         return sName;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java Wed Sep  7 19:04:18 2016
@@ -18,7 +18,9 @@
  */
 package org.apache.openjpa.jdbc.identifier;
 
-import org.apache.commons.lang3.StringUtils;
+import java.util.Objects;
+
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.lib.identifier.IdentifierConfiguration;
 import org.apache.openjpa.lib.identifier.IdentifierRule;
 import org.apache.openjpa.lib.identifier.IdentifierUtil;
@@ -46,7 +48,7 @@ public class Normalizer {
      * @param name
      */
     public static String normalizeMulti(String name) {
-        if (StringUtils.isEmpty(name)) {
+        if (StringUtil.isEmpty(name)) {
             return name;
         }
         String[] names = normalizer.splitName(defaultRule, name);
@@ -58,7 +60,7 @@ public class Normalizer {
      * @param name
      */
     public static String normalizeString(String name) {
-        if (StringUtils.isEmpty(name)) {
+        if (StringUtil.isEmpty(name)) {
             return name;
         }
         if (!normalizer.isDelimited(defaultRule, name)) {
@@ -73,7 +75,7 @@ public class Normalizer {
      * @param name
      */
     public static boolean isDelimited(String name) {
-        if (StringUtils.isEmpty(name)) {
+        if (StringUtil.isEmpty(name)) {
             return false;
         }
         return normalizer.isDelimited(defaultRule, name);
@@ -86,7 +88,7 @@ public class Normalizer {
      * @param name2
      */
     public static boolean fullNamesEqual(String name1, String name2) {
-        if (StringUtils.isEmpty(name1) && StringUtils.isEmpty(name2)) {
+        if (StringUtil.isEmpty(name1) && StringUtil.isEmpty(name2)) {
             return true;
         }
         // Split multi-part names into individual components and compare
@@ -98,11 +100,11 @@ public class Normalizer {
         }
         for (int i = 0; i < names1.length; i++) {
             if (normalizer.isDelimited(defaultRule, names1[i])) {
-                if (!StringUtils.equals(names1[i],names2[i])) {
+                if (!Objects.equals(names1[i],names2[i])) {
                     return false;
                 }
             } else {
-                if (!StringUtils.equalsIgnoreCase(names1[i],names2[i])) {
+                if (!StringUtil.equalsIgnoreCase(names1[i],names2[i])) {
                     return false;
                 }
             }
@@ -118,15 +120,15 @@ public class Normalizer {
      * @param name2
      */
     public static boolean namesEqual(String name1, String name2) {
-        if (StringUtils.isEmpty(name1) && StringUtils.isEmpty(name2)) {
+        if (StringUtil.isEmpty(name1) && StringUtil.isEmpty(name2)) {
             return true;
         }
         if (normalizer.isDelimited(defaultRule, name1)) {
-            if (!StringUtils.equals(name1, name2)) {
+            if (!Objects.equals(name1, name2)) {
                 return false;
             }
         } else {
-            if (!StringUtils.equalsIgnoreCase(name1, name2)) {
+            if (!StringUtil.equalsIgnoreCase(name1, name2)) {
                 return false;
             }
         }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java Wed Sep  7 19:04:18 2016
@@ -28,7 +28,7 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.locks.ReentrantLock;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
 import org.apache.openjpa.jdbc.sql.Result;
 import org.apache.openjpa.jdbc.sql.SelectExecutor;
@@ -339,7 +339,7 @@ public class FinderCacheImpl
     public void setExcludes(String excludes) {
         lock();
         try {
-            if (StringUtils.isEmpty(excludes))
+            if (StringUtil.isEmpty(excludes))
                 return;
             if (_exclusionPatterns == null)
                 _exclusionPatterns = new ArrayList<String>();

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java Wed Sep  7 19:04:18 2016
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
 import org.apache.openjpa.jdbc.meta.MappingRepository;
@@ -134,7 +134,7 @@ public class JDBCBrokerFactory
     protected void synchronizeMappings(ClassLoader loader, 
         JDBCConfiguration conf) {
         String action = conf.getSynchronizeMappings();
-        if (StringUtils.isEmpty(action))
+        if (StringUtil.isEmpty(action))
             return;
 
         MappingRepository repo = conf.getMappingRepositoryInstance();

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCFetchConfigurationImpl.java Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
@@ -323,7 +323,7 @@ public class JDBCFetchConfigurationImpl
     }
 
     public JDBCFetchConfiguration addJoin(String join) {
-        if (StringUtils.isEmpty(join))
+        if (StringUtil.isEmpty(join))
             throw new UserException(_loc.get("null-join"));
         
         lock();
@@ -429,7 +429,7 @@ public class JDBCFetchConfigurationImpl
     }
 
     public JDBCFetchConfiguration addFetchInnerJoin(String join) {
-        if (StringUtils.isEmpty(join))
+        if (StringUtil.isEmpty(join))
             throw new UserException(_loc.get("null-join"));
         
         lock();

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java Wed Sep  7 19:04:18 2016
@@ -23,11 +23,12 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.TreeMap;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.kernel.FetchConfiguration;
 import org.apache.openjpa.kernel.PreparedQuery;
@@ -214,7 +215,7 @@ public class PreparedQueryCacheImpl impl
 	public void setExcludes(String excludes) {
 		lock(false);
 		try {
-			if (StringUtils.isEmpty(excludes))
+			if (StringUtil.isEmpty(excludes))
 				return;
 			String[] patterns = excludes.split(PATTERN_SEPARATOR);
 			for (String pattern : patterns)
@@ -424,7 +425,7 @@ public class PreparedQueryCacheImpl impl
                 return false;
             Exclusion that = (Exclusion)other;
             return this._strong == that.isStrong() 
-                && StringUtils.equals(this._pattern, that.getPattern());
+                && Objects.equals(this._pattern, that.getPattern());
         }
         
         @Override

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java Wed Sep  7 19:04:18 2016
@@ -31,7 +31,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
 import org.apache.openjpa.jdbc.meta.MappingRepository;
 import org.apache.openjpa.jdbc.meta.QueryResultMapping;
@@ -120,7 +120,7 @@ public class SQLStoreQuery
             }
             _meta = candidate;
 
-            String sql = StringUtils.trimToNull(ctx.getQueryString());
+            String sql = StringUtil.trimToNull(ctx.getQueryString());
             if (sql == null)
                 throw new UserException(_loc.get("no-sql"));
             _select = q.getStore().getDBDictionary().isSelect(sql);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java Wed Sep  7 19:04:18 2016
@@ -28,7 +28,7 @@ import java.util.concurrent.ConcurrentHa
 
 import javax.transaction.NotSupportedException;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -212,7 +212,7 @@ public class TableJDBCSeq extends Abstra
      * a '|' character. This method parses it back to array of Strings. 
      */
     public void setUniqueColumns(String columnNames) {
-    	_uniqueColumnNames = (StringUtils.isEmpty(columnNames)) 
+    	_uniqueColumnNames = (StringUtil.isEmpty(columnNames))
     		? null : DBIdentifier.split(columnNames, DBIdentifierType.COLUMN, IdentifierUtil.BAR);
     }
     

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/DiscriminatorMappingInfo.java Wed Sep  7 19:04:18 2016
@@ -20,7 +20,7 @@ package org.apache.openjpa.jdbc.meta;
 
 import java.lang.reflect.Modifier;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.meta.strats.NoneDiscriminatorStrategy;
 import org.apache.openjpa.jdbc.meta.strats.SuperclassDiscriminatorStrategy;
 import org.apache.openjpa.jdbc.meta.strats.ValueMapDiscriminatorStrategy;
@@ -64,7 +64,7 @@ public class DiscriminatorMappingInfo
     public Object getValue(Discriminator discrim, boolean adapt) {
         if (discrim.getValue() != null)
             return discrim.getValue();
-        if (StringUtils.isEmpty(_value)) {
+        if (StringUtil.isEmpty(_value)) {
             return discrim.getMappingRepository().getMappingDefaults().
                 getDiscriminatorValue(discrim, adapt);
         }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java Wed Sep  7 19:04:18 2016
@@ -24,7 +24,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.identifier.Normalizer;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -1404,7 +1404,7 @@ public abstract class MappingInfo
             String[] names = Normalizer.splitName(fieldName);
             fullTarget = names.length > 1;
 
-            if (names.length > 1 && StringUtils.isEmpty(names[0])) {
+            if (names.length > 1 && StringUtil.isEmpty(names[0])) {
                 // allow use of '.' without prefix to mean "use expected local
                 // cls"; but if we already inversed no need to switch again
                 if (!inverse)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/PropertiesReverseCustomizer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/PropertiesReverseCustomizer.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/PropertiesReverseCustomizer.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/PropertiesReverseCustomizer.java Wed Sep  7 19:04:18 2016
@@ -22,7 +22,7 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.schema.Column;
 import org.apache.openjpa.jdbc.schema.ForeignKey;
 import org.apache.openjpa.jdbc.schema.Table;
@@ -223,7 +223,7 @@ public class PropertiesReverseCustomizer
      * Return the property value for the given key, or null if none.
      */
     protected String getProperty(String key) {
-        String val = StringUtils.trimToNull(_props.getProperty(key));
+        String val = StringUtil.trimToNull(_props.getProperty(key));
         _unaccessed.remove(key);
         return val;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.schema.Column;
 import org.apache.openjpa.jdbc.sql.Joins;
 import org.apache.openjpa.lib.meta.SourceTracker;
@@ -311,7 +311,7 @@ public class QueryResultMapping
          * Map the given path to the given result id.
          */
         public void addMapping(String path, Object id) {
-            if (StringUtils.isEmpty(path))
+            if (StringUtil.isEmpty(path))
                 throw new MetaDataException(_loc.get("null-path",
                     QueryResultMapping.this, _candidate));
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java Wed Sep  7 19:04:18 2016
@@ -42,7 +42,6 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.enhance.ApplicationIdTool;
 import org.apache.openjpa.enhance.CodeGenerator;
@@ -260,7 +259,7 @@ public class ReverseMappingTool
      * indicate no package.
      */
     public void setPackageName(String packageName) {
-        _package = StringUtils.trimToNull(packageName);
+        _package = StringUtil.trimToNull(packageName);
     }
 
     /**
@@ -1509,7 +1508,7 @@ public class ReverseMappingTool
                 name = name.toLowerCase();
             subs = StringUtil.split(name, "_", 0);
             for (int i = 0; i < subs.length; i++)
-                buf.append(StringUtils.capitalize(subs[i]));
+                buf.append(StringUtil.capitalize(subs[i]));
         }
 
         name = replaceInvalidCharacters(table.getName());
@@ -1521,7 +1520,7 @@ public class ReverseMappingTool
             // if the name would end in 'Id', make it end in 'Ident'
             if (i == subs.length - 1 && subs[i].equalsIgnoreCase("id"))
                 subs[i] = "ident";
-            buf.append(StringUtils.capitalize(subs[i]));
+            buf.append(StringUtil.capitalize(subs[i]));
         }
 
         return buf.toString();
@@ -1542,7 +1541,7 @@ public class ReverseMappingTool
         String[] subs = StringUtil.split(name, "_", 0);
         for (int i = 0; i < subs.length; i++) {
             if (i > 0)
-                subs[i] = StringUtils.capitalize(subs[i]);
+                subs[i] = StringUtil.capitalize(subs[i]);
             buf.append(subs[i]);
         }
         return getUniqueName(buf.toString(), dec);
@@ -1592,7 +1591,7 @@ public class ReverseMappingTool
      * package-private for testing.
      */
     static String replaceInvalidCharacters(String str) {
-        if (StringUtils.isEmpty(str))
+        if (StringUtil.isEmpty(str))
             return str;
 
         StringBuilder buf = new StringBuilder(str);
@@ -1664,7 +1663,7 @@ public class ReverseMappingTool
                 if (propNames[nameIdx] == null)
                     continue;
 
-                typeSpec = StringUtils.trimToNull(_typeMap.getProperty
+                typeSpec = StringUtil.trimToNull(_typeMap.getProperty
                     (propNames[nameIdx]));
                 if (typeSpec != null) 
                     typeName = propNames[nameIdx];

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/SequenceMapping.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/SequenceMapping.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/SequenceMapping.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/SequenceMapping.java Wed Sep  7 19:04:18 2016
@@ -20,7 +20,6 @@ package org.apache.openjpa.jdbc.meta;
 
 import java.io.File;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.jdbc.conf.JDBCSeqValue;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
@@ -29,6 +28,7 @@ import org.apache.openjpa.jdbc.kernel.Ta
 import org.apache.openjpa.jdbc.kernel.ValueTableJDBCSeq;
 import org.apache.openjpa.lib.conf.PluginValue;
 import org.apache.openjpa.lib.identifier.IdentifierUtil;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.meta.SequenceMetaData;
 
 /**
@@ -237,15 +237,13 @@ public class SequenceMapping
         // Array of unique column names are passed to configuration
         // as a single string "x|y|z". The configurable (TableJDBCSeq) must
         // parse it back.
-        if (!DBIdentifier.isNull(_uniqueConstraintName) && 
-                _uniqueConstraintName.getName().length() > 0) {
-            appendProperty(props, PROP_UNIQUE_CONSTRAINT, 
-                addQuotes(_uniqueConstraintName.getName()));
+        if (!DBIdentifier.isNull(_uniqueConstraintName) && _uniqueConstraintName.getName().length() > 0) {
+            appendProperty(props, PROP_UNIQUE_CONSTRAINT, addQuotes(_uniqueConstraintName.getName()));
         }
             
-        if (_uniqueColumns != null && _uniqueColumns.length > 0)
-        	appendProperty(props, PROP_UNIQUE, 
-        			StringUtils.join(_uniqueColumns,'|'));
+        if (_uniqueColumns != null && _uniqueColumns.length > 0) {
+            appendProperty(props, PROP_UNIQUE, StringUtil.join(_uniqueColumns, "|"));
+        }
     }
     
     private String addQuotes(String name) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java Wed Sep  7 19:04:18 2016
@@ -23,7 +23,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
 import org.apache.openjpa.jdbc.kernel.JDBCStore;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
@@ -94,7 +94,7 @@ public class ClassNameDiscriminatorStrat
             String className;
             while (rs.next()) {
                 className = dict.getString(rs, 1);
-                if (StringUtils.isEmpty(className))
+                if (StringUtil.isEmpty(className))
                     throw new ClassNotFoundException(_loc.get("no-class-name",
                         disc.getClassMapping(), col).getMessage());
                 Class.forName(className, true, loader);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MultiColumnVersionStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MultiColumnVersionStrategy.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MultiColumnVersionStrategy.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MultiColumnVersionStrategy.java Wed Sep  7 19:04:18 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.openjpa.jdbc.meta.strats;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.schema.Column;
 import org.apache.openjpa.jdbc.schema.Schemas;
 import org.apache.openjpa.meta.JavaTypes;
@@ -81,7 +81,7 @@ public class MultiColumnVersionStrategy
     	}
     	if (_javaTypes[i] == null) {
     		Column col = (Column)vers.getMappingInfo().getColumns().get(i);
-    		if (!StringUtils.isEmpty(col.getTypeName())) {
+    		if (!StringUtil.isEmpty(col.getTypeName())) {
     			Class javaType = Schemas.getJavaType(col.getType(), 
     					col.getSize(), col.getDecimalDigits());
     			_javaTypes[i] = JavaTypes.getTypeCode(javaType);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Column.java Wed Sep  7 19:04:18 2016
@@ -28,7 +28,7 @@ import java.sql.Types;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.QualifiedDBIdentifier;
 import org.apache.openjpa.jdbc.meta.JavaSQLTypes;
@@ -587,7 +587,7 @@ public class Column
      * @deprecated use setTargetIdentifier(DBIdentifier target)
      */
     public void setTarget(String target) {
-        setTargetIdentifier(DBIdentifier.newColumn(StringUtils.trimToNull(target)));
+        setTargetIdentifier(DBIdentifier.newColumn(StringUtil.trimToNull(target)));
     }
 
     public void setTargetIdentifier(DBIdentifier target) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java Wed Sep  7 19:04:18 2016
@@ -29,7 +29,7 @@ import java.util.List;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.conf.Configurations;
@@ -67,7 +67,7 @@ public class DataSourceFactory {
         boolean factory2) {
         String driver = (factory2) ? conf.getConnection2DriverName()
             : conf.getConnectionDriverName();
-        if (StringUtils.isEmpty(driver))
+        if (StringUtil.isEmpty(driver))
             throw new UserException(_loc.get("no-driver", conf)).
                 setFatal(true);
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/NameSet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/NameSet.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/NameSet.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/NameSet.java Wed Sep  7 19:04:18 2016
@@ -22,7 +22,7 @@ import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
 import org.apache.openjpa.lib.util.Localizer;
@@ -74,7 +74,7 @@ public class NameSet
      * @param validate if true, null or empty names will not be accepted
      */
     protected void addName(DBIdentifier name, boolean validate) {
-        if (DBIdentifier.isNull(name) || StringUtils.isEmpty(name.getName())) {
+        if (DBIdentifier.isNull(name) || StringUtil.isEmpty(name.getName())) {
             if (validate)
                 throw new IllegalArgumentException(_loc.get("bad-name", name)
                     .getMessage());

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java Wed Sep  7 19:04:18 2016
@@ -35,7 +35,7 @@ import java.util.LinkedList;
 import java.util.Set;
 import javax.sql.DataSource;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
@@ -1514,7 +1514,7 @@ public class SchemaTool {
             gen.setOpenJPATables(flags.openjpaTables);
 
             String schemas = conf.getSchemas();
-            if (StringUtils.isEmpty(schemas))
+            if (StringUtil.isEmpty(schemas))
                 schemas = "all";
             log.info(_loc.get("sch-reflect", schemas));
             gen.generateSchemas();

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -21,7 +21,7 @@ package org.apache.openjpa.jdbc.schema;
 import java.sql.Types;
 import java.util.Date;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.identifier.Normalizer;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -56,7 +56,7 @@ public class Schemas {
         if (schemas.length == 0)
             return DBIdentifier.NULL;
         String[] names = Normalizer.splitName(schemas[0]);
-        if (names.length == 0 || StringUtils.isEmpty(names[0])) {
+        if (names.length == 0 || StringUtil.isEmpty(names[0])) {
             return DBIdentifier.NULL;
         }
         return DBIdentifier.newSchema(names[0]);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/XMLSchemaSerializer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/XMLSchemaSerializer.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/XMLSchemaSerializer.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/XMLSchemaSerializer.java Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.lib.meta.XMLMetaDataSerializer;
 import org.apache.openjpa.lib.util.Localizer;
@@ -264,7 +264,7 @@ public class XMLSchemaSerializer
         throws SAXException {
         addAttribute("name", col.getName());
         addAttribute("type", Schemas.getJDBCName(col.getType()));
-        if (!StringUtils.isEmpty(col.getTypeName())
+        if (!StringUtil.isEmpty(col.getTypeName())
             && !col.getTypeName().equalsIgnoreCase
             (Schemas.getJDBCName(col.getType())))
             addAttribute("type-name", col.getTypeName());

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -64,7 +64,6 @@ import java.util.TreeMap;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.identifier.ColumnDefIdentifierRule;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
@@ -775,7 +774,7 @@ public class DBDictionary
             return (char) getInt(rs, column);
 
         String str = getString(rs, column);
-        return (StringUtils.isEmpty(str)) ? 0 : str.charAt(0);
+        return (StringUtil.isEmpty(str)) ? 0 : str.charAt(0);
     }
 
     /**
@@ -891,7 +890,7 @@ public class DBDictionary
     public Locale getLocale(ResultSet rs, int column)
         throws SQLException {
         String str = getString(rs, column);
-        if (StringUtils.isEmpty(str))
+        if (StringUtil.isEmpty(str))
             return null;
 
         String[] params = StringUtil.split(str, "_", 3);
@@ -1868,7 +1867,7 @@ public class DBDictionary
      *                  size clause will be inserted appropriately.   
      */
     protected String insertSize(String typeName, String size) {
-        if (StringUtils.isEmpty(size)) {
+        if (StringUtil.isEmpty(size)) {
             int idx = typeName.indexOf("{0}");
             if (idx != -1) {
                 return typeName.substring(0, idx);
@@ -1923,7 +1922,7 @@ public class DBDictionary
             joinSyntax = SYNTAX_TRADITIONAL;
         else if ("database".equals(syntax))
             joinSyntax = SYNTAX_DATABASE;
-        else if (!StringUtils.isEmpty(syntax))
+        else if (!StringUtil.isEmpty(syntax))
             throw new IllegalArgumentException(syntax);
     }
     
@@ -2721,8 +2720,7 @@ public class DBDictionary
         buf.append(" ").append(selects).append(" FROM ").append(from);
 
         if (checkTableForUpdate
-                && (StringUtils.isEmpty(forUpdateClause) && !StringUtils
-                        .isEmpty(tableForUpdateClause))) {
+                && (StringUtil.isEmpty(forUpdateClause) && !StringUtil.isEmpty(tableForUpdateClause))) {
             buf.append(" ").append(tableForUpdateClause);
         }
 
@@ -4137,9 +4135,9 @@ public class DBDictionary
     protected Sequence newSequence(ResultSet sequenceMeta)
         throws SQLException {
         Sequence seq = new Sequence();
-        seq.setSchemaIdentifier(fromDBName(StringUtils.stripEnd(sequenceMeta.getString("SEQUENCE_SCHEMA"), null),
+        seq.setSchemaIdentifier(fromDBName(StringUtil.stripEnd(sequenceMeta.getString("SEQUENCE_SCHEMA"), null),
             DBIdentifierType.SCHEMA));
-        seq.setIdentifier(fromDBName(StringUtils.stripEnd(sequenceMeta.getString("SEQUENCE_NAME"), null),
+        seq.setIdentifier(fromDBName(StringUtil.stripEnd(sequenceMeta.getString("SEQUENCE_NAME"), null),
             DBIdentifierType.SEQUENCE));
         return seq;
     }
@@ -4228,7 +4226,7 @@ public class DBDictionary
             == DatabaseMetaData.columnNoNulls);
 
         String def = colMeta.getString("COLUMN_DEF");
-        if (!StringUtils.isEmpty(def) && !"null".equalsIgnoreCase(def))
+        if (!StringUtil.isEmpty(def) && !"null".equalsIgnoreCase(def))
             c.setDefaultString(def);
         return c;
     }
@@ -4814,7 +4812,7 @@ public class DBDictionary
         
         // if user has unset sequence sql, null it out so we know sequences
         // aren't supported
-        nextSequenceQuery = StringUtils.trimToNull(nextSequenceQuery);
+        nextSequenceQuery = StringUtil.trimToNull(nextSequenceQuery);
         
         if (selectWords != null)
             selectWordSet.addAll(Arrays.asList(StringUtil.split(selectWords.toUpperCase(), ",", 0)));
@@ -4953,7 +4951,7 @@ public class DBDictionary
         throws SQLException {
         if (!connected)
             connectedConfiguration(conn);
-        if (!StringUtils.isEmpty(initializationSQL)) {
+        if (!StringUtil.isEmpty(initializationSQL)) {
             PreparedStatement stmnt = null;
             try {
                 stmnt = conn.prepareStatement(initializationSQL);

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -23,9 +23,11 @@ import java.security.PrivilegedActionExc
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.SQLException;
+import java.util.Objects;
+
 import javax.sql.DataSource;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
 import org.apache.openjpa.lib.conf.Configurations;
@@ -123,7 +125,7 @@ public class DBDictionaryFactory {
      */
     static String getProtocol(String url) {
         String protocol = null;
-        if (!StringUtils.isEmpty(url)) {
+        if (!StringUtil.isEmpty(url)) {
             if (url.startsWith("jdbc:")) {
                 int colonCount = 1;
                 int next = "jdbc:".length();
@@ -215,7 +217,7 @@ public class DBDictionaryFactory {
      * Guess the dictionary class name to use based on the product string.
      */
     private static String dictionaryClassForString(String prod, JDBCConfiguration conf) {
-        if (StringUtils.isEmpty(prod))
+        if (StringUtil.isEmpty(prod))
             return null;
         prod = prod.toLowerCase();
 
@@ -290,7 +292,7 @@ public class DBDictionaryFactory {
             return DBDictionary.class.getName();
 
         String prodClassName = dbdictionaryPlugin.unalias(prod);
-        if (!StringUtils.equals(prod, prodClassName))
+        if (!Objects.equals(prod, prodClassName))
             return prodClassName;
         
         // give up

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java Wed Sep  7 19:04:18 2016
@@ -25,7 +25,7 @@ import java.sql.Types;
 import java.util.Arrays;
 import java.util.Locale;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -140,7 +140,7 @@ public class H2Dictionary extends DBDict
         String pkStr;
         if (pk != null) {
             pkStr = getPrimaryKeyConstraintSQL(pk);
-            if (!StringUtils.isEmpty(pkStr))
+            if (!StringUtil.isEmpty(pkStr))
                 buf.append(", ").append(pkStr);
         }
 

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.sql.SQLException;
 import java.sql.Types;
 import java.util.Arrays;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -225,7 +225,7 @@ public class HSQLDictionary extends DBDi
         String pkStr;
         if (pk != null) {
             pkStr = getPrimaryKeyConstraintSQL(pk);
-            if (!StringUtils.isEmpty(pkStr))
+            if (!StringUtil.isEmpty(pkStr))
                 buf.append(", ").append(pkStr);
         }
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java Wed Sep  7 19:04:18 2016
@@ -30,7 +30,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
@@ -228,7 +228,7 @@ public class MariaDBDictionary extends D
     @Override
     public String[] getCreateTableSQL(Table table) {
         String[] sql = super.getCreateTableSQL(table);
-        if (!StringUtils.isEmpty(tableType))
+        if (!StringUtil.isEmpty(tableType))
             sql[0] = sql[0] + " ENGINE = " + tableType;
         return sql;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java Wed Sep  7 19:04:18 2016
@@ -30,7 +30,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
@@ -240,7 +240,7 @@ public class MySQLDictionary
     @Override
     public String[] getCreateTableSQL(Table table) {
         String[] sql = super.getCreateTableSQL(table);
-        if (!StringUtils.isEmpty(tableType))
+        if (!StringUtil.isEmpty(tableType))
             sql[0] = sql[0] + " ENGINE = " + tableType;
         return sql;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.log.Log;
@@ -141,7 +141,7 @@ public class SQLErrorCodeReader {
 				Node textNode = child.getFirstChild();
                 if (storeErrorTypes.containsKey(errorType) && textNode != null){
                     String errorCodes = textNode.getNodeValue();
-                    if (!StringUtils.isEmpty(errorCodes)) {
+                    if (!StringUtil.isEmpty(errorCodes)) {
                         String[] codes = errorCodes.split(ERROR_CODE_DELIMITER);
                         for (String code : codes) {
                             dict.addErrorCode(storeErrorTypes.get(errorType),

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Wed Sep  7 19:04:18 2016
@@ -39,7 +39,7 @@ import java.util.Stack;
 import java.util.TreeMap;
 
 import org.apache.commons.collections.iterators.EmptyIterator;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
 import org.apache.openjpa.jdbc.kernel.EagerFetchModes;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
@@ -1487,7 +1487,7 @@ public class SelectImpl
      */
     private void where(String sql, PathJoins pj) {
         // no need to use joins...
-        if (StringUtils.isEmpty(sql))
+        if (StringUtil.isEmpty(sql))
             return;
 
         if (_where == null)
@@ -1533,7 +1533,7 @@ public class SelectImpl
      */
     private void having(String sql, PathJoins pj) {
         // no need to use joins...
-        if (StringUtils.isEmpty(sql))
+        if (StringUtil.isEmpty(sql))
             return;
 
         if (_having == null)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SolidDBDictionary.java Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
 import org.apache.openjpa.jdbc.kernel.exps.Lit;
@@ -161,7 +161,7 @@ public class SolidDBDictionary
         String pkStr;
         if (pk != null) {
             pkStr = getPrimaryKeyConstraintSQL(pk);
-            if (!StringUtils.isEmpty(pkStr))
+            if (!StringUtil.isEmpty(pkStr))
                 buf.append(", ").append(pkStr);
         }
 

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -27,7 +27,7 @@ import java.sql.SQLException;
 import java.sql.Types;
 import java.util.Arrays;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
 import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -288,7 +288,7 @@ public class SybaseDictionary
 
         // warn about jdbc compliant flag
         String url = conf.getConnectionURL();
-        if (!StringUtils.isEmpty(url)
+        if (!StringUtil.isEmpty(url)
             && url.toLowerCase().indexOf("jdbc:sybase:tds") != -1
             && url.toLowerCase().indexOf("be_as_jdbc_compliant_as_possible=")
             == -1) {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java Wed Sep  7 19:04:18 2016
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.audit.AuditLogger;
 import org.apache.openjpa.audit.Auditor;
 import org.apache.openjpa.datacache.CacheDistributionPolicy;
@@ -1067,7 +1067,7 @@ public class OpenJPAConfigurationImpl
      * Lookup the connection factory at the given name.
      */
     private Object lookupConnectionFactory(String name, String userKey) {
-        name = StringUtils.trimToNull(name);
+        name = StringUtil.trimToNull(name);
         if (name == null)
             return null;
         try {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java Wed Sep  7 19:04:18 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.openjpa.conf;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.event.RemoteCommitEventManager;
 import org.apache.openjpa.event.RemoteCommitProvider;
 import org.apache.openjpa.lib.conf.Configuration;
@@ -131,7 +131,7 @@ public class RemoteCommitProviderValue
             return;
 
         _opts = Configurations.parseProperties(getProperties());
-        String transmit = StringUtils.trimToNull(_opts.removeProperty
+        String transmit = StringUtil.trimToNull(_opts.removeProperty
             ("transmitPersistedObjectIds", "TransmitPersistedObjectIds", null));
         if (transmit != null)
             _transmitPersIds = Boolean.valueOf (transmit);

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=1759663&r1=1759662&r2=1759663&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 Wed Sep  7 19:04:18 2016
@@ -18,7 +18,8 @@
  */
 package org.apache.openjpa.conf;
 
-import org.apache.commons.lang3.StringUtils;
+import java.util.Objects;
+
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.UserException;
 
@@ -91,8 +92,8 @@ public class Specification {
         if (other == null || !this.getClass().isInstance(other))
             return false;
         Specification that = (Specification)other;
-        return StringUtils.equals(_name, this._name) && _major == that._major 
-            && StringUtils.equals(_minor, this._minor);
+        return Objects.equals(_name, this._name) && _major == that._major
+            && Objects.equals(_minor, this._minor);
     }    
     
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java Wed Sep  7 19:04:18 2016
@@ -28,9 +28,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.event.RemoteCommitEvent;
 import org.apache.openjpa.event.RemoteCommitListener;
@@ -463,7 +463,7 @@ public abstract class AbstractDataCache
      * 
      */
     public DataCache getPartition(String name, boolean create) {
-        if (StringUtils.equals(_name, name))
+        if (Objects.equals(_name, name))
             return this;
         return null;
     }
@@ -527,7 +527,7 @@ public abstract class AbstractDataCache
 
     public void setTypes(String types) {
         _includedTypes =
-            StringUtils.isEmpty(types) ? null : new HashSet<>(Arrays.asList(StringUtil.split(types, ";", 0)));
+            StringUtil.isEmpty(types) ? null : new HashSet<>(Arrays.asList(StringUtil.split(types, ";", 0)));
         if (log.isWarnEnabled())
             log.warn(s_loc.get("recommend_jpa2_caching", new Object[]{"Types", DataCacheMode.ENABLE_SELECTIVE.toString()}));
     }
@@ -540,7 +540,7 @@ public abstract class AbstractDataCache
 
     public void setExcludedTypes(String types) {
         _excludedTypes =
-            StringUtils.isEmpty(types) ? null : new HashSet<>(Arrays.asList(StringUtil.split(types, ";", 0)));
+            StringUtil.isEmpty(types) ? null : new HashSet<>(Arrays.asList(StringUtil.split(types, ";", 0)));
         if (log.isWarnEnabled())
             log.warn(s_loc.get("recommend_jpa2_caching", new Object[]{"ExcludeTypes", DataCacheMode.DISABLE_SELECTIVE.toString()}));
     }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java Wed Sep  7 19:04:18 2016
@@ -37,7 +37,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 
 import java.util.Objects;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.enhance.PCRegistry;
 import org.apache.openjpa.kernel.Query;
 import org.apache.openjpa.kernel.QueryContext;
@@ -402,7 +402,7 @@ public class QueryKey
             return false;
 
         QueryKey other = (QueryKey) ob;
-        return StringUtils.equals(_candidateClassName,
+        return Objects.equals(_candidateClassName,
             other._candidateClassName)
             && _subclasses == other._subclasses
             && _ignoreChanges == other._ignoreChanges

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.java Wed Sep  7 19:04:18 2016
@@ -21,7 +21,7 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.kernel.OpenJPAStateManager;
 import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.meta.ClassMetaData;
@@ -76,7 +76,7 @@ public class TypeBasedCacheDistributionP
     }
     
     private Set<String> parseNames(String types) {
-        if (StringUtils.isEmpty(types))
+        if (StringUtil.isEmpty(types))
             return Collections.emptySet();
         String[] names = StringUtil.split(types, ";", 0);
         Set<String> set = new HashSet<String>();

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java Wed Sep  7 19:04:18 2016
@@ -36,7 +36,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
 import org.apache.openjpa.lib.conf.Configuration;
@@ -559,7 +558,7 @@ public class ApplicationIdTool {
             if (i > 0)
                 code.afterSection();
             typeName = getTypeName(_fields[i]);
-            propName = StringUtils.capitalize(_fields[i].getName());
+            propName = StringUtil.capitalize(_fields[i].getName());
 
             code.tab().append("public ").append(typeName).append(" ");
             if (_fields[i].getDeclaredTypeCode() == JavaTypes.BOOLEAN

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java Wed Sep  7 19:04:18 2016
@@ -26,7 +26,7 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.List;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.lib.util.ClassUtil;
 import org.apache.openjpa.lib.util.CodeFormat;
@@ -301,7 +301,7 @@ public class CodeGenerator {
     private void appendFieldCode(FieldMetaData fmd, CodeFormat decs,
         CodeFormat code) {
         String fieldName = fmd.getName();
-        String capFieldName = StringUtils.capitalize(fieldName);
+        String capFieldName = StringUtil.capitalize(fieldName);
         String propertyName = fieldName;
         if (propertyName.startsWith("_"))
             propertyName = propertyName.substring(1);

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/DynamicStorageGenerator.java Wed Sep  7 19:04:18 2016
@@ -21,8 +21,8 @@ package org.apache.openjpa.enhance;
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.meta.JavaTypes;
 import org.apache.openjpa.util.InternalException;
 import serp.bytecode.BCClass;
@@ -281,8 +281,7 @@ public class DynamicStorageGenerator {
             return;
         Class type = forType(typeCode);
         // public void set<Type> (int field, <type> val)
-        String name = Object.class.equals(type) ? "Object" :
-            StringUtils.capitalize(type.getName());
+        String name = Object.class.equals(type) ? "Object" : StringUtil.capitalize(type.getName());
         name = "set" + name;
         BCMethod method = bc.declareMethod(name, void.class,
             new Class[]{ int.class, type });
@@ -294,11 +293,12 @@ public class DynamicStorageGenerator {
         tabins.setLow(0);
         tabins.setHigh(types.length - 1);
         Instruction defaultIns;
-        if (handle == POLICY_SILENT)
+        if (handle == POLICY_SILENT) {
             defaultIns = code.vreturn();
-        else
-            defaultIns = throwException
-                (code, IllegalArgumentException.class);
+        }
+        else {
+            defaultIns = throwException(code, IllegalArgumentException.class);
+        }
         tabins.setDefaultTarget(defaultIns);
         int objectCount = 0;
         for (int i = 0; i < types.length; i++) {
@@ -359,7 +359,7 @@ public class DynamicStorageGenerator {
         Class type = forType(typeCode);
         // public <type> get<Type>Field (int field)
         String name = Object.class.equals(type) ? "Object" :
-            StringUtils.capitalize(type.getName());
+            StringUtil.capitalize(type.getName());
         name = "get" + name;
         BCMethod method = bc.declareMethod(name, type,
             new Class[]{ int.class });
@@ -443,7 +443,7 @@ public class DynamicStorageGenerator {
         // private <type> <name>
         BCField field = bc.declareField(name, type);
         field.setAccessFlags(getFieldAccess());
-        name = StringUtils.capitalize(name);
+        name = StringUtil.capitalize(name);
 
         // getter
         String prefix = (type == boolean.class) ? "is" : "get";

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java?rev=1759663&r1=1759662&r2=1759663&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java Wed Sep  7 19:04:18 2016
@@ -24,7 +24,7 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.lib.util.StringUtil;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.kernel.AbstractPCData;
 import org.apache.openjpa.kernel.FetchConfiguration;
@@ -689,7 +689,7 @@ public class PCDataGenerator
             code.aload().setThis();
             code.getfield().setField(getFieldName(index), type);
             code.invokeinterface().setMethod(OpenJPAStateManager.class,
-                "store" + StringUtils.capitalize(type.getName()),
+                "store" + StringUtil.capitalize(type.getName()),
                 void.class, new Class[]{ int.class, type });
         } else {
             // fmd = sm.getMetaData().getField(i);
@@ -862,7 +862,7 @@ public class PCDataGenerator
             code.aload().setParam(0);
             code.constant().setValue(index);
             code.invokeinterface().setMethod(OpenJPAStateManager.class,
-                "fetch" + StringUtils.capitalize(type.getName()), type,
+                "fetch" + StringUtil.capitalize(type.getName()), type,
                 new Class[]{ int.class });
             code.putfield().setField(getFieldName(index), type);
             code.aload().setThis();




Mime
View raw message