This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DataoutputStream patch


This is a trivial fix extracted from Intel's classpath JBoss patch.

Bryce.


2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

    * java/io/DataOutputStream (write (byte[], int, int): Update "written"
    correctly. Fix from the ORP team.

Index: DataOutputStream.java
===================================================================
RCS file: /cvs/gcc/egcs/libjava/java/io/DataOutputStream.java,v
retrieving revision 1.3
diff -u -r1.3 DataOutputStream.java
--- DataOutputStream.java       2000/03/07 19:55:26     1.3
+++ DataOutputStream.java       2001/12/16 00:11:41
@@ -48,7 +48,7 @@
     throws IOException, NullPointerException, IndexOutOfBoundsException
   {
     out.write(b, off, len);
-    written += len - off;
+    written += len;
   }
 
   public final void writeBoolean (boolean v) throws IOException



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]