You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conny Krappatsch <co...@smb-tec.com> on 2000/11/02 14:35:46 UTC
Compiled XML
Hi Stefano,
I don't know thee state of the compiled XML and I refer on the code you send to the list.
I used parts of it for our client-server comunication for the Prowler XML storage and found a bug in CompiledXMLInputStream.java#readChars(int). The problem arrises if there's something else to be read than the standard ASCII characters and the characters in the resulting character array are less than the bytes in the recieved byte array.
Adding the following piece of code right before the return statement fixes it:
if (i < len) {
char[] newstr = new char[i];
System.arraycopy(str, 0, newstr, 0, i );
return newstr;
}
regards,
Conny Krappatsch
--
______________________________________________________________________
Conny Krappatsch mailto:conny@smb-tec.com
SMB GmbH http://www.smb-tec.com