getCurrentState() should return null when on root element.

This commit is contained in:
Michael Jumper
2012-12-23 23:25:44 -08:00
parent d1663bd3a1
commit 4b45564835

View File

@@ -72,6 +72,11 @@ public class DocumentHandler extends DefaultHandler {
* @return The current element state.
*/
private DocumentHandlerState getCurrentState() {
// If no state, return null
if (stack.isEmpty())
return null;
return stack.getLast();
}