cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skolbac...@apache.org
Subject [1/2] cayenne git commit: [CAY-2131] Modeler. NullPointerException in reverse engineering when importing different catalogs in one datamap
Date Thu, 03 Nov 2016 20:30:41 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 469bacb44 -> c4ebfa5d4


[CAY-2131] Modeler. NullPointerException in reverse engineering when importing different catalogs
in one datamap


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

Branch: refs/heads/master
Commit: 7e971729b7c4cb720a232d06ec0779e6abee4c4b
Parents: 469bacb
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Wed Nov 2 16:15:47 2016 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Thu Nov 3 23:19:36 2016 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/cayenne/dbsync/merge/DbMerger.java    | 3 ++-
 .../apache/cayenne/dbsync/reverse/filters/FiltersConfig.java   | 6 ++++--
 docs/doc/src/main/resources/RELEASE-NOTES.txt                  | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/7e971729/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/DbMerger.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/DbMerger.java b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/DbMerger.java
index 7e1c261..319ef26 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/DbMerger.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/DbMerger.java
@@ -131,7 +131,8 @@ public class DbMerger {
     private Collection<DbEntity> filter(DataMap existing, FiltersConfig filtersConfig)
{
         Collection<DbEntity> existingFiltered = new LinkedList<>();
         for (DbEntity entity : existing.getDbEntities()) {
-            if (filtersConfig.tableFilter(entity.getCatalog(), entity.getSchema()).isIncludeTable(entity.getName())
!= null) {
+            TableFilter tableFilter = filtersConfig.tableFilter(entity.getCatalog(), entity.getSchema());
+            if (tableFilter != null && tableFilter.isIncludeTable(entity.getName())
!= null) {
                 existingFiltered.add(entity);
             }
         }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7e971729/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/filters/FiltersConfig.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/filters/FiltersConfig.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/filters/FiltersConfig.java
index 2ff5ab6..41e5a14 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/filters/FiltersConfig.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/filters/FiltersConfig.java
@@ -41,11 +41,13 @@ public class FiltersConfig {
     }
 
     public PatternFilter proceduresFilter(String catalog, String schema) {
-        return getSchemaFilter(catalog, schema).procedures;
+        SchemaFilter schemaFilter = getSchemaFilter(catalog, schema);
+        return schemaFilter == null ? null : schemaFilter.procedures;
     }
 
     public TableFilter tableFilter(String catalog, String schema) {
-        return getSchemaFilter(catalog, schema).tables;
+        SchemaFilter schemaFilter = getSchemaFilter(catalog, schema);
+        return schemaFilter == null ? null : schemaFilter.tables;
     }
 
     protected SchemaFilter getSchemaFilter(String catalog, String schema) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7e971729/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index b20931a..a21e0f9 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -61,6 +61,7 @@ CAY-2122 Vertical Inheritance: Cannot Insert Record For Implementing Class
with
 CAY-2125 SchemaUpdateStrategy doesn't work with multiple DataNodes
 CAY-2126 Modeler cannot upgrade project from v7 to v9
 CAY-2128 Modeler stored procedures are not imported
+CAY-2131 Modeler NullPointerException in reverse engineering when importing different catalogs
in one datamap
 
 ----------------------------------
 Release: 4.0.M3


Mime
View raw message