]> source.dussan.org Git - iciql.git/commitdiff
Avoid NullPointerException 32/head
authorMatthias Cullmann <matthias.cullmann@gmail.com>
Tue, 23 May 2017 14:18:07 +0000 (16:18 +0200)
committerGitHub <noreply@github.com>
Tue, 23 May 2017 14:18:07 +0000 (16:18 +0200)
replacement for #31

src/main/java/com/iciql/TableInspector.java

index d775f0fc570a67160ddef0d6e2f1449b03b1b6cb..02bb8aefcc22e416a10f6cb103744affdb92742a 100644 (file)
@@ -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
+}