I definitely need this new Evolution thingy. Forgot the actual
attachement..

Am Donnerstag, den 27.09.2007, 20:50 +0200 schrieb Roman Kennke:
> This fixes a problem with sliced StringCharBuffers. See:
> 
> http://bugs.sun.com/view_bug.do?bug_id=6546113
> 
> Feel free to integrate this in the repository.
> 
> Cheers, Roman
-- 
http://kennke.org/blog/
Index: j2se/src/share/classes/java/nio/StringCharBuffer.java
===================================================================
--- j2se/src/share/classes/java/nio/StringCharBuffer.java	(Revision 252)
+++ j2se/src/share/classes/java/nio/StringCharBuffer.java	(Arbeitskopie)
@@ -77,11 +77,11 @@
     }
 
     public final char get() {
-	return str.charAt(nextGetIndex());
+	return str.charAt(nextGetIndex() + offset);
     }
 
     public final char get(int index) {
-	return str.charAt(checkIndex(index));
+	return str.charAt(checkIndex(index) + offset);
     }
 
     // ## Override bulk get methods for better performance

Reply via email to