Author: gnodet
Date: Tue May 20 06:06:27 2008
New Revision: 658229

URL: http://svn.apache.org/viewvc?rev=658229&view=rev
Log:
SMX4KNL-38: Fix NullPointerException instead of command not found in the console

Modified:
    
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java

Modified: 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java
URL: 
http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java?rev=658229&r1=658228&r2=658229&view=diff
==============================================================================
--- 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java
 (original)
+++ 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java
 Tue May 20 06:06:27 2008
@@ -226,6 +226,9 @@
                     if (n == null) {
                         n = layout.find(cmdId);
                     }
+                    if (n == null) {
+                        throw new NotFoundException(cmdId);
+                    }
                     CommandContext ctx = commandContext;
                     Command cmd;
                     if (n instanceof CommandNode) {


Reply via email to