[kaffe] CVS kaffe (robilad): small fix for file connection

Kaffe CVS cvs-commits at kaffe.org
Sun Mar 5 21:05:36 PST 2006


PatchSet 7141 
Date: 2006/03/06 04:56:17
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
small fix for file connection

2006-03-06  Dalibor Topic  <robilad at kaffe.org>

        * gnu/java/net/protocol/file/Connection.java (unquote):
        Update position in buffer after decoding a unicode character
        outside of the basic plane.

Members: 
	ChangeLog:1.4659->1.4660 
	libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.5->1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4659 kaffe/ChangeLog:1.4660
--- kaffe/ChangeLog:1.4659	Sun Mar  5 14:35:19 2006
+++ kaffe/ChangeLog	Mon Mar  6 04:56:17 2006
@@ -1,3 +1,9 @@
+2006-03-06  Dalibor Topic  <robilad at kaffe.org>
+
+        * gnu/java/net/protocol/file/Connection.java (unquote):
+        Update position in buffer after decoding a unicode character
+        outside of the basic plane.
+
 2006-03-05  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffevm/kaffe.def: Small cleanup to
Index: kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java
diff -u kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.5 kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.6
--- kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.5	Sun Mar  5 13:02:15 2006
+++ kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java	Mon Mar  6 04:56:20 2006
@@ -160,7 +160,9 @@
  	else if (c > 127) {
 	    try {
 		byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
-		System.arraycopy(c_as_bytes, 0, buf, pos, c_as_bytes.length);
+		final int c_length = c_as_bytes.length;
+		System.arraycopy(c_as_bytes, 0, buf, pos, c_length);
+		pos += c_length;
 	    }
 	    catch (java.io.UnsupportedEncodingException x2) {
 		throw (Error) new InternalError().initCause(x2);




More information about the kaffe mailing list