Bug#2056 odl:xsql karaf command is throwing NPE when empty args
[controller.git] / 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;