cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: removing dependency on commons-lang
Date Fri, 30 Sep 2016 14:28:20 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master ec0d6b2ca -> 236b0102d


removing dependency on commons-lang


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/236b0102
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/236b0102
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/236b0102

Branch: refs/heads/master
Commit: 236b0102dfdddc69355391e1ab98b6cf6c4d09f2
Parents: ec0d6b2
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Fri Sep 30 17:28:14 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Fri Sep 30 17:28:14 2016 +0300

----------------------------------------------------------------------
 .../cayenne/tools/dbimport/DbImportConfiguration.java    | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/236b0102/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/DbImportConfiguration.java
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/DbImportConfiguration.java
b/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/DbImportConfiguration.java
index 2e2bd21..8fb0820 100644
--- a/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/DbImportConfiguration.java
+++ b/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/DbImportConfiguration.java
@@ -26,13 +26,13 @@ import org.apache.cayenne.dbsync.merge.DbMergerConfig;
 import org.apache.cayenne.dbsync.merge.DefaultModelMergeDelegate;
 import org.apache.cayenne.dbsync.merge.EntityMergeSupport;
 import org.apache.cayenne.dbsync.merge.ModelMergeDelegate;
+import org.apache.cayenne.dbsync.reverse.NameFilter;
+import org.apache.cayenne.dbsync.reverse.NamePatternMatcher;
 import org.apache.cayenne.dbsync.reverse.db.DbLoader;
 import org.apache.cayenne.dbsync.reverse.db.DbLoaderConfiguration;
 import org.apache.cayenne.dbsync.reverse.db.DbLoaderDelegate;
 import org.apache.cayenne.dbsync.reverse.db.DefaultDbLoaderDelegate;
 import org.apache.cayenne.dbsync.reverse.db.LoggingDbLoaderDelegate;
-import org.apache.cayenne.dbsync.reverse.NameFilter;
-import org.apache.cayenne.dbsync.reverse.NamePatternMatcher;
 import org.apache.cayenne.dbsync.reverse.filters.CatalogFilter;
 import org.apache.cayenne.dbsync.reverse.filters.FiltersConfig;
 import org.apache.cayenne.map.DataMap;
@@ -49,7 +49,6 @@ import java.net.MalformedURLException;
 import java.sql.Connection;
 import java.util.Collections;
 
-import static org.apache.commons.lang.StringUtils.isNotEmpty;
 
 /**
  * @since 4.0
@@ -241,7 +240,7 @@ public class DbImportConfiguration {
         // do not override default package of existing DataMap unless it is
         // explicitly requested by the plugin caller
         String defaultPackage = getDefaultPackage();
-        if (isNotEmpty(defaultPackage)) {
+        if (defaultPackage != null && defaultPackage.length() > 0) {
             dataMap.setDefaultPackage(defaultPackage);
         }
 
@@ -251,7 +250,7 @@ public class DbImportConfiguration {
             // explicitly requested by the plugin caller, and the provided catalog is
             // not a pattern
             String catalog = catalogs[0].name;
-            if (isNotEmpty(catalog) && catalog.indexOf('%') < 0) {
+            if (defaultPackage != null && defaultPackage.length() > 0 &&
catalog.indexOf('%') < 0) {
                 dataMap.setDefaultCatalog(catalog);
             }
 
@@ -259,7 +258,7 @@ public class DbImportConfiguration {
             // explicitly requested by the plugin caller, and the provided schema is
             // not a pattern
             String schema = catalogs[0].schemas[0].name;
-            if (isNotEmpty(schema) && schema.indexOf('%') < 0) {
+            if (defaultPackage != null && defaultPackage.length() > 0 &&
schema.indexOf('%') < 0) {
                 dataMap.setDefaultSchema(schema);
             }
         }


Mime
View raw message