Fix a error in stream reader

This commit is contained in:
Aria 2023-06-14 03:20:17 -07:00
parent 318c470f3b
commit 92a28dc627

View file

@ -62,6 +62,10 @@ public class XmlRpcStreamReader {
if ( event == XMLStreamConstants.START_ELEMENT ) {
String elementName = xmlStreamReader.getLocalName ( );
if ( elementName.equals ( "param" ) ) {
require( XMLStreamConstants.START_ELEMENT, null, "value");
nextTag (); // Something to be deserialized!
Object value = deserializeValue ( );
paramsList.add ( value );
}
@ -83,8 +87,8 @@ public class XmlRpcStreamReader {
private Object deserializeValue ( ) throws XMLStreamException {
nextTag ( );
require( XMLStreamConstants.START_ELEMENT, null, "value");
nextTag (); // Something to be deserialized!
int eventType = xmlStreamReader.getEventType ( );
if ( eventType == XMLStreamConstants.CHARACTERS || eventType == XMLStreamConstants.CDATA ) {
return xmlStreamReader.getText ( );