[kaffe] Patches to enable kaffe to run Saxon 7.3
Ito Kazumitsu
kaz at maczuka.gcd.org
Sun Nov 24 05:06:50 PST 2002
>>>>> ":" == Ito Kazumitsu <kaz at maczuka.gcd.org> writes:
:> I downloaded java.nio.CharBuffer.java and gnu.java.nio.CharBufferImpl.java
:> from Classpath's CVS. Saxon 7.3 can be run with the new nio classes.
Unfortunately, I found a case where position(int) of
java.nio.Buffer throws IllegalArgumentException when a new
CharBufferImpl is being created. I am using the following patch
to avoid this. I will send this to classpath mailing list later.
--- gnu/java/nio/CharBufferImpl.java.orig Sun Nov 24 07:54:29 2002
+++ gnu/java/nio/CharBufferImpl.java Sun Nov 24 11:06:57 2002
@@ -55,24 +55,24 @@
{
this.backing_buffer = new char[cap];
this.cap = cap;
- this.position(off);
this.limit(lim);
+ this.position(off);
}
public CharBufferImpl(char[] array, int off, int lim)
{
this.backing_buffer = array;
this.cap = array.length;
- this.position(off);
this.limit(lim);
+ this.position(off);
}
public CharBufferImpl (CharBufferImpl copy)
{
backing_buffer = copy.backing_buffer;
ro = copy.ro;
- position (copy.position ());
limit (copy.limit());
+ position (copy.position ());
}
void inc_pos (int a)
bash-2.02$ diff -u java/nio/CharBuffer.java.orig java/nio/CharBuffer.java
--- java/nio/CharBuffer.java.orig Sun Nov 24 07:55:45 2002
+++ java/nio/CharBuffer.java Sun Nov 24 10:42:01 2002
@@ -61,7 +61,7 @@
final public static CharBuffer wrap (char[] array, int offset, int length)
{
- return new CharBufferImpl (array, offset, length);
+ return new CharBufferImpl (array, offset, offset + length);
}
final public static CharBuffer wrap (char[] array)
More information about the kaffe
mailing list