incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixing NPE in schema command
Date Wed, 06 Nov 2013 17:38:54 GMT
Updated Branches:
  refs/heads/master 7785babaf -> 9482f8ec6


Fixing NPE in schema command


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/9482f8ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/9482f8ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/9482f8ec

Branch: refs/heads/master
Commit: 9482f8ec6c4febd90b0b7938634454b739beb0d0
Parents: 7785bab
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Nov 6 12:38:29 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Nov 6 12:38:47 2013 -0500

----------------------------------------------------------------------
 .../apache/blur/shell/SchemaTableCommand.java   | 22 ++++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/9482f8ec/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
----------------------------------------------------------------------
diff --git a/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java b/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
index b77b975..dad0ce4 100644
--- a/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
+++ b/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
@@ -56,17 +56,21 @@ public class SchemaTableCommand extends Command implements TableFirstArgCommand
         Map<String, String> properties = columnDefinition.getProperties();
         String subColumnName = columnDefinition.getSubColumnName();
         if (subColumnName != null) {
-          out.println(  "\t\t\tsubName   : " + subColumnName);
-          out.println(  "\t\t\tfieldType : " + fieldType);
-          Map<String, String> props = new TreeMap<String, String>(properties);
-          for (Entry<String, String> e : props.entrySet()) {
-            out.println("\t\t\tprop      : " + e);
+          out.println("\t\t\tsubName   : " + subColumnName);
+          out.println("\t\t\tfieldType : " + fieldType);
+          if (properties != null) {
+            Map<String, String> props = new TreeMap<String, String>(properties);
+            for (Entry<String, String> e : props.entrySet()) {
+              out.println("\t\t\tprop      : " + e);
+            }
           }
         } else {
-          out.println(  "\t\tfieldType : " + fieldType);
-          Map<String, String> props = new TreeMap<String, String>(properties);
-          for (Entry<String, String> e : props.entrySet()) {
-            out.println("\t\tprop      : " + e);
+          out.println("\t\tfieldType : " + fieldType);
+          if (properties != null) {
+            Map<String, String> props = new TreeMap<String, String>(properties);
+            for (Entry<String, String> e : props.entrySet()) {
+              out.println("\t\tprop      : " + e);
+            }
           }
         }
       }


Mime
View raw message