geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r705609 - in /geronimo/gshell/trunk/gshell-remote/gshell-whisper: pom.xml src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java
Date Fri, 17 Oct 2008 13:30:32 GMT
Author: jdillon
Date: Fri Oct 17 06:30:31 2008
New Revision: 705609

URL: http://svn.apache.org/viewvc?rev=705609&view=rev
Log:
Use Closer instead of plexus-utils IOUtil

Modified:
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml?rev=705609&r1=705608&r2=705609&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml Fri Oct 17 06:30:31 2008
@@ -64,11 +64,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-utils</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.mina</groupId>
             <artifactId>mina-core</artifactId>
             <version>1.1.7</version>

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java?rev=705609&r1=705608&r2=705609&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/BogusSSLContextFactory.java
Fri Oct 17 06:30:31 2008
@@ -23,9 +23,9 @@
 
 package org.apache.geronimo.gshell.whisper.ssl;
 
-import org.codehaus.plexus.util.IOUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.apache.geronimo.gshell.io.Closer;
 
 import javax.annotation.PostConstruct;
 import javax.net.ssl.KeyManagerFactory;
@@ -116,16 +116,16 @@
             try {
                 keyStore = KeyStore.getInstance("JKS");
 
-                InputStream in = getClass().getResourceAsStream(keystoreResource);
-                if (in == null) {
+                InputStream input = getClass().getResourceAsStream(keystoreResource);
+                if (input == null) {
                     throw new GeneralSecurityException("Failed to load bogus keystore from
resource: " + keystoreResource);
                 }
 
                 try {
-                    keyStore.load(in, keystorePassword);
+                    keyStore.load(input, keystorePassword);
                 }
                 finally {
-                    IOUtil.close(in);
+                    Closer.close(input);
                 }
             }
             catch (IOException e) {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java?rev=705609&r1=705608&r2=705609&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/SessionStreamFilter.java
Fri Oct 17 06:30:31 2008
@@ -21,7 +21,7 @@
 
 import org.apache.mina.common.IoFilterAdapter;
 import org.apache.mina.common.IoSession;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.geronimo.gshell.io.Closer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,9 +51,9 @@
      */
     @Override
     public void sessionClosed(final NextFilter nextFilter, final IoSession session) throws
Exception {
-        IOUtil.close(SessionInputStream.BINDER.unbind(session));
-        IOUtil.close(SessionOutputStream.BINDER.unbind(session));
-
+        Closer.close(SessionInputStream.BINDER.unbind(session),
+                     SessionOutputStream.BINDER.unbind(session));
+        
         nextFilter.sessionClosed(session);
     }
 



Mime
View raw message