Skip to content

Commit

Permalink
0005934: Getting null pointer from Column.java in new method anyPlatf…
Browse files Browse the repository at this point in the history
…ormColumnTypeContains on platformColumns
  • Loading branch information
chenson42 committed Jul 25, 2023
1 parent bf49306 commit 6b1ee1e
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions symmetric-db/src/main/java/org/jumpmind/db/model/Column.java
Expand Up @@ -622,36 +622,44 @@ public PlatformColumn findPlatformColumn(String name) {
}

private PlatformColumn findDifferentVersionPlatformColumn(String name) {
for (Entry<String, PlatformColumn> entry : platformColumns.entrySet()) {
if (entry.getKey() != null && entry.getKey().contains(name)) {
return entry.getValue();
if (platformColumns != null) {
for (Entry<String, PlatformColumn> entry : platformColumns.entrySet()) {
if (entry.getKey() != null && entry.getKey().contains(name)) {
return entry.getValue();
}
}
}
return null;
}

public boolean anyPlatformColumnNameContains(String name) {
for (String platformColumnName : platformColumns.keySet()) {
if (platformColumnName != null && platformColumnName.contains(name)) {
return true;
if (platformColumns != null) {
for (String platformColumnName : platformColumns.keySet()) {
if (platformColumnName != null && platformColumnName.contains(name)) {
return true;
}
}
}
return false;
}

public boolean anyPlatformColumnTypeContains(String type) {
for (PlatformColumn platformColumn : platformColumns.values()) {
if (platformColumn.getType() != null && platformColumn.getType().contains(type)) {
return true;
if (platformColumns != null) {
for (PlatformColumn platformColumn : platformColumns.values()) {
if (platformColumn.getType() != null && platformColumn.getType().contains(type)) {
return true;
}
}
}
return false;
}

public boolean allPlatformColumnNamesContain(String name) {
for (String platformColumnName : platformColumns.keySet()) {
if (platformColumnName != null && !platformColumnName.contains(name)) {
return false;
if (platformColumns != null) {
for (String platformColumnName : platformColumns.keySet()) {
if (platformColumnName != null && !platformColumnName.contains(name)) {
return false;
}
}
}
return true;
Expand Down

0 comments on commit 6b1ee1e

Please sign in to comment.