2004-05-30 Michael Koch <konqueror@gmx.de>

* java/nio/Buffer.java
	(limit): Fixed off by one error.
	* java/nio/CharBuffer.java
	(wrap): Fixed arguments, added javadocs.

From-SVN: r82448
This commit is contained in:
Michael Koch 2004-05-30 13:38:20 +00:00 committed by Michael Koch
parent 74c2dbf7a1
commit 1b2545bcf2
3 changed files with 46 additions and 20 deletions

View file

@ -148,11 +148,11 @@ public abstract class Buffer
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;