ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-32: Fixed NPE for indexes.
Date Tue, 27 Jan 2015 10:08:08 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 f304e00c6 -> 7871d381a


# IGNITE-32: Fixed NPE for indexes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7871d381
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7871d381
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7871d381

Branch: refs/heads/ignite-32
Commit: 7871d381aedf69de53d66540ff833c5f2df84f75
Parents: f304e00c
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jan 27 17:08:08 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jan 27 17:08:08 2015 +0700

----------------------------------------------------------------------
 .../ignite/schema/parser/DatabaseMetadataParser.java   | 13 +++++++++++--
 .../java/org/apache/ignite/schema/ui/MessageBox.java   |  5 +++--
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7871d381/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
index 3e51d2d..27e1382 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
@@ -211,8 +211,17 @@ public class DatabaseMetadataParser {
 
         try (ResultSet idxs = dbMeta.getIndexInfo(catalog, schema, tbl, false, true)) {
             while (idxs.next()) {
-                String idx = toJavaFieldName(idxs.getString(6));
-                String col = toJavaFieldName(idxs.getString(9));
+                String idxName = idxs.getString(6);
+
+                String colName = idxs.getString(9);
+
+                if (idxName == null || colName == null)
+                    continue;
+
+                String idx = toJavaFieldName(idxName);
+
+                String col = toJavaFieldName(colName);
+
                 String askOrDesc = idxs.getString(10);
 
                 LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>
idxCols = groups.get(idx);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7871d381/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
index 902bd91..9f1b211 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
@@ -232,7 +232,8 @@ public class MessageBox extends ModalDialog {
      * @param e Optional exception to show.
      */
     public static void errorDialog(Stage owner, String msg, Throwable e) {
-        showDialog(owner, MessageType.ERROR,
-            (e != null && e.getMessage() != null) ? msg + "\n" + e.getMessage() :
msg, false);
+        String exMsg = e != null ? (e.getMessage() != null ? e.getMessage() : e.getClass().getName())
: null;
+
+        showDialog(owner, MessageType.ERROR, exMsg != null ? msg + "\n" + exMsg : msg, false);
     }
 }


Mime
View raw message