geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r704975 - in /geronimo/gshell/trunk: gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
Date Wed, 15 Oct 2008 18:04:24 GMT
Author: gnodet
Date: Wed Oct 15 11:04:24 2008
New Revision: 704975

URL: http://svn.apache.org/viewvc?rev=704975&view=rev
Log:
Remove an ugly cast by adding the setLocation method to the Command interface

Modified:
    geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java

Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java?rev=704975&r1=704974&r2=704975&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
(original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
Wed Oct 15 11:04:24 2008
@@ -31,6 +31,8 @@
 {
     CommandLocation getLocation();
 
+    void setLocation(CommandLocation location);
+
     /**
      * Returns the action of the command.
      *

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java?rev=704975&r1=704974&r2=704975&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
Wed Oct 15 11:04:24 2008
@@ -60,9 +60,7 @@
             throw new DuplicateCommandException(name);
         }
 
-        if (command instanceof CommandSupport) {
-            ((CommandSupport)command).setLocation(new CommandLocationImpl(name));
-        }
+        command.setLocation(new CommandLocationImpl(name));
 
         commands.put(name, command);
 



Mime
View raw message