harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r834046 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
Date Mon, 09 Nov 2009 13:04:07 GMT
Author: tellison
Date: Mon Nov  9 13:04:07 2009
New Revision: 834046

URL: http://svn.apache.org/viewvc?rev=834046&view=rev
Log:
Apply fix for HARMONY-6371 ([classlib][luni]The PrintStream.write(int b) method doesn't auto
flush on z/OS)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java?rev=834046&r1=834045&r2=834046&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java Mon
Nov  9 13:04:07 2009
@@ -707,7 +707,10 @@
         }
         try {
             out.write(oneByte);
-            if (autoflush && (oneByte & 0xFF) == '\n') {
+            int b = oneByte & 0xFF;
+            // 0x0A is ASCII newline, 0x15 is EBCDIC newline.
+            boolean isNewline = b == 0x0A || b == 0x15; 
+            if (autoflush && isNewline) {
                 flush();
             }
         } catch (IOException e) {



Mime
View raw message