geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r725707 - /geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java
Date Thu, 11 Dec 2008 15:00:30 GMT
Author: gnodet
Date: Thu Dec 11 07:00:30 2008
New Revision: 725707

URL: http://svn.apache.org/viewvc?rev=725707&view=rev
Log:
Allow other parts of the application to use the System streams without modifications

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java?rev=725707&r1=725706&r2=725707&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/SystemOutputHijacker.java
Thu Dec 11 07:00:30 2008
@@ -205,8 +205,10 @@
      * Returns the currently registered streams.
      */
     private static synchronized StreamPair current() {
-        StreamRegistration reg = registration(true);
-        
+        StreamRegistration reg = registration(false);
+        if (reg == null) {
+            return previous;
+        }
         return reg.streams;
     }
     



Mime
View raw message