You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/09/18 22:59:00 UTC

svn commit: r577056 - /geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java

Author: jdillon
Date: Tue Sep 18 13:58:59 2007
New Revision: 577056

URL: http://svn.apache.org/viewvc?rev=577056&view=rev
Log:
Use lookup helpers

Modified:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java?rev=577056&r1=577055&r2=577056&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShell.java Tue Sep 18 13:58:59 2007
@@ -83,13 +83,11 @@
             container = new DefaultPlexusContainer(config);
 
             // We first need to stuff in the IO context for the new shell instance
-            IOLookup ioLookup = (IOLookup) container.lookup(ComponentFactory.class, IOLookup.class.getSimpleName());
-            ioLookup.set(io);
+            IOLookup.set(container, io);
 
             // And then lets stuff in the environment too
             Environment env = new DefaultEnvironment(io);
-            EnvironmentLookup envLookup = (EnvironmentLookup) container.lookup(ComponentFactory.class, EnvironmentLookup.class.getSimpleName());
-            envLookup.set(env);
+            EnvironmentLookup.set(container, env);
 
             // Then look up the shell we are gonna delegate to
             shell = (InteractiveShell) container.lookup(InteractiveShell.class);