harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r501449 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java
Date Tue, 30 Jan 2007 16:29:22 GMT
Author: gshimansky
Date: Tue Jan 30 08:29:21 2007
New Revision: 501449

URL: http://svn.apache.org/viewvc?view=rev&rev=501449
Log:
Applied HARMONY-1787 [drlvm][kernel] j.l.System.out and j.l.System.err should be buffered

Tests passed on Ubuntu6 x86, Windows 2003 server x86 and SuSE9 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java?view=diff&rev=501449&r1=501448&r2=501449
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/System.java
Tue Jan 30 08:29:21 2007
@@ -20,7 +20,7 @@
 import java.io.FileDescriptor;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.FilterOutputStream;
+import java.io.BufferedOutputStream;
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.io.IOException;
@@ -342,17 +342,8 @@
      * for initialization of <code>err</code> field
      */
     private static PrintStream createErr() {
-        //return new PrintStream(new BufferedOutputStream(new FileOutputStream(
-        //    FileDescriptor.err)), true);
-        //FIXME: WORKAROUND FOR BUG
-        // We can't use here simple FileOutputStream cuz such code causes our VM
-        // crash while initialization of main Thread object
-        //
-        // Correct fix of the problem is closing out and err print streams on VM
-        // exit for example, in Runtime.exit(). Another bug	 prevents us of doing
-        // such thing
-        return new PrintStream(new FilterOutputStream(new FileOutputStream(
-            FileDescriptor.err)), true);
+        return new PrintStream(new BufferedOutputStream(new FileOutputStream(
+                FileDescriptor.err)), true);
     }
 
     /**
@@ -368,11 +359,8 @@
      * for initialization of <code>out</code> field
      */
     private static PrintStream createOut() {
-        //return new PrintStream(new BufferedOutputStream(new FileOutputStream(
-        //    FileDescriptor.out)), true);
-        //FIXME: WORKAROUND FOR BUG
-        return new PrintStream(new FilterOutputStream(new FileOutputStream(
-            FileDescriptor.out)), true);
+        return new PrintStream(new BufferedOutputStream(new FileOutputStream(
+                FileDescriptor.out)), true);
     }
 
     /**



Mime
View raw message