Author: ecn
Date: Thu Jun 6 16:12:46 2013
New Revision: 1490335
URL: http://svn.apache.org/r1490335
Log:
ACCUMULO-1478 prevent NPE when starting the shell
Modified:
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
Modified:
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
URL:
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java?rev=1490335&r1=1490334&r2=1490335&view=diff
==============================================================================
---
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
(original)
+++
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
Thu Jun 6 16:12:46 2013
@@ -17,6 +17,7 @@
package org.apache.accumulo.core.util.shell;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -80,7 +81,7 @@ public class ShellOptionsJC {
private boolean hdfsZooInstance;
@Parameter(names = {"-z", "--zooKeeperInstance"}, description = "use a
zookeeper instance with the given instance name and list of zoo hosts", arity =
2)
- private List<String> zooKeeperInstance;
+ private List<String> zooKeeperInstance = new ArrayList<String>();
@Parameter(names = "--auth-timeout", description = "minutes the shell can be
idle without re-entering a password")
private int authTimeout = 60; // TODO Add validator for positive number