Updated Branches:
  refs/heads/apache-blur-0.2 194740f53 -> dd1db1c1f

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/dd1db1c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/dd1db1c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/dd1db1c1

Branch: refs/heads/apache-blur-0.2
Commit: dd1db1c1ffa3860a640392ac103ae2247768d959
Parents: 194740f
Author: Aaron McCurry <[email protected]>
Authored: Wed Nov 6 12:38:29 2013 -0500
Committer: Aaron McCurry <[email protected]>
Committed: Wed Nov 6 12:38:29 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/dd1db1c1/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);
+            }
           }
         }
       }

Reply via email to