Kuddi: Bug in XmlRpcParser.java

Alan Slattery <[email protected]> Thu, 20 May 2004 14:38:05 +0100
Newsgroups gmane.comp.java.enhydra.kxmlrpc
Message-ID <[email protected]>
Hi there,
   We were working with the latest released version of kXML-RPC (version 0.6) 
and found a bug in XmlRpcParser.java.

In the method parseParams() there is the following:

	while( parser.peek().getType() != Xml.END_TAG ) {
	    parser.read( Xml.START_TAG, "", "param" );
             // Retrieve a Java representation of the XML-RPC parameter value
	    params.addElement( parseValue() );    // *** BUG ***
	    parser.skip();

There should be a call to parser.skip() before the line marked with BUG above. 
If any whitespace exists between the opening of the "param" start tag and the 
value, a parse exception is thrown, as the implementation of parseValue() 
expects the next read() to be a start tag for "value" but instead it gets the 
whitespace.

If you have been notified of this already then apologies, but a search of the 
mailing lists returned nothing relevant and the online view of the source is not 
working, so I can't verify if it has already been fixed.

Thanks,
   Alan Slattery