Bug#2056 odl:xsql karaf command is throwing NPE when empty args 98/11498/1
authorSharon Aicler <saichler@cisco.com>
Tue, 23 Sep 2014 18:40:46 +0000 (11:40 -0700)
committerSharon Aicler <saichler@cisco.com>
Tue, 23 Sep 2014 18:40:46 +0000 (11:40 -0700)
Change-Id: I60b6321aea4e02e4a7b409645bc8ebcec9a39112
Signed-off-by: Sharon Aicler <saichler@cisco.com>
opendaylight/md-sal/sal-karaf-xsql/src/main/java/org/opendaylight/controller/xsql/xsql.java

index b7994dc1bf317c872bc501ca42f4a6b7b42bd43a..9f0266c19db76b2cc7ea829742eb81b4a605dabf 100644 (file)
@@ -16,6 +16,10 @@ public class xsql extends OsgiCommandSupport {
     private String argument;
 
     protected Object doExecute() throws Exception {
+        if(argument==null){
+            System.out.println("Nothing to do..., please specify a command.");
+            return null;
+        }
         XSQLAdapter.getInstance().processCommand(new StringBuffer(argument),
                 System.out);
         return null;