[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: Fixed off by one error in Buffer

Kaffe CVS cvs-commits at kaffe.org
Thu May 27 12:30:16 PDT 2004


PatchSet 4789 
Date: 2004/05/27 19:22:45
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: Fixed off by one error in Buffer

2004-05-27  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/java/nio/Buffer.java:
        Resynced with GNU Classpath.

        2004-05-27  Michael Koch  <konqueror at gmx.de>

        * java/nio/Buffer.java
        (limit): Fixed off by one error.

Members: 
	ChangeLog:1.2358->1.2359 
	libraries/javalib/java/nio/Buffer.java:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2358 kaffe/ChangeLog:1.2359
--- kaffe/ChangeLog:1.2358	Thu May 27 00:06:30 2004
+++ kaffe/ChangeLog	Thu May 27 19:22:45 2004
@@ -1,5 +1,15 @@
 2004-05-27  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/java/nio/Buffer.java:
+	Resynced with GNU Classpath.
+
+	2004-05-27  Michael Koch  <konqueror at gmx.de>
+
+	* java/nio/Buffer.java
+	(limit): Fixed off by one error.
+
+2004-05-27  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/nio/ByteBufferImpl.java:
 	(get) Throw a BufferUnderflowException if we run out
 	of bounds.
Index: kaffe/libraries/javalib/java/nio/Buffer.java
diff -u kaffe/libraries/javalib/java/nio/Buffer.java:1.7 kaffe/libraries/javalib/java/nio/Buffer.java:1.8
--- kaffe/libraries/javalib/java/nio/Buffer.java:1.7	Mon Apr 12 11:40:27 2004
+++ kaffe/libraries/javalib/java/nio/Buffer.java	Thu May 27 19:22:47 2004
@@ -148,11 +148,11 @@
     if ((newLimit < 0) || (newLimit > cap))
       throw new IllegalArgumentException ();
 
-    if (newLimit <= mark)
+    if (newLimit < mark)
         mark = -1;
 
     if (pos > newLimit)
-        pos = newLimit - 1;
+        pos = newLimit;
 
     limit = newLimit;
     return this;




More information about the kaffe mailing list