summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2017-05-23 10:28:41 -0400
committerGitHub <noreply@github.com>2017-05-23 10:28:41 -0400
commit7c0aec71814f5b1bf4f93a9186b945beec42c70b (patch)
tree6c6c227c74a8e387e038cc9c7363ccfd8df9134d
parent7be2d6c81c1177d28628002b245e3e5308bed32f (diff)
parent0f4613ba1e0bd97f5c6dfca3dc8fb4620553bdb5 (diff)
downloadiciql-7c0aec71814f5b1bf4f93a9186b945beec42c70b.tar.gz
iciql-7c0aec71814f5b1bf4f93a9186b945beec42c70b.zip
Merge pull request #32 from culmat/patch-3
Avoid NullPointerException
-rw-r--r--src/main/java/com/iciql/TableInspector.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/iciql/TableInspector.java b/src/main/java/com/iciql/TableInspector.java
index d775f0f..02bb8ae 100644
--- a/src/main/java/com/iciql/TableInspector.java
+++ b/src/main/java/com/iciql/TableInspector.java
@@ -114,6 +114,9 @@ public class TableInspector {
indexes = Utils.newHashMap();
while (rs.next()) {
IndexInspector info = new IndexInspector(rs);
+ if(info.name == null) {
+ continue;
+ }
if (info.type.equals(IndexType.UNIQUE)) {
String name = info.name.toLowerCase();
if (name.startsWith("primary") || name.startsWith("sys_idx_sys_pk")
@@ -713,4 +716,4 @@ public class TableInspector {
append(value.getClass().getSimpleName() + "." + value.name());
}
}
-} \ No newline at end of file
+}