mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 22:21:22 +00:00
DocumentHandlerState should be static. Automatically throw exception if no TagHandler returned.
This commit is contained in:
@@ -106,6 +106,10 @@ public class DocumentHandler extends DefaultHandler {
|
|||||||
handler = parent_handler.childElement(localName, attributes);
|
handler = parent_handler.childElement(localName, attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no handler returned, the element was not expected
|
||||||
|
if (handler == null)
|
||||||
|
throw new SAXException("Unexpected element: '" + localName + "'");
|
||||||
|
|
||||||
// Append new element state to stack
|
// Append new element state to stack
|
||||||
stack.addLast(new DocumentHandlerState(handler));
|
stack.addLast(new DocumentHandlerState(handler));
|
||||||
|
|
||||||
@@ -136,7 +140,7 @@ public class DocumentHandler extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* The current state of the DocumentHandler.
|
* The current state of the DocumentHandler.
|
||||||
*/
|
*/
|
||||||
private class DocumentHandlerState {
|
private static class DocumentHandlerState {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current text content of the current element being parsed.
|
* The current text content of the current element being parsed.
|
||||||
|
Reference in New Issue
Block a user