From: Matthias Cullmann Date: Tue, 23 May 2017 14:18:07 +0000 (+0200) Subject: Avoid NullPointerException X-Git-Tag: release-2.2.1~9^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F32%2Fhead;p=iciql.git Avoid NullPointerException replacement for #31 --- 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 +}