getCurrentState() should return null when on root element.
This commit is contained in:
1 parent
d1663bd3a1
commit
4b45564835
1 file changed
+5
@@ -72,6 +72,11 @@ public class DocumentHandler extends DefaultHandler {
|
|||||||
* @return The current element state.
|
* @return The current element state.
|
||||||
*/
|
*/
|
||||||
private DocumentHandlerState getCurrentState() {
|
private DocumentHandlerState getCurrentState() {
|
||||||
|
|
||||||
|
// If no state, return null
|
||||||
|
if (stack.isEmpty())
|
||||||
|
return null;
|
||||||
|
|
||||||
return stack.getLast();
|
return stack.getLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user