From: Niels Erik G. Nielsen Date: Wed, 6 May 2015 20:16:14 +0000 (+0200) Subject: Intercepts empty-stack exc, rec-cmd. mkjsf-16 X-Git-Tag: v0.0.7~7 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=d237859420496f6d1f183d0f64bf2f78b0799fc0;p=mkjsf-moved-to-github.git Intercepts empty-stack exc, rec-cmd. mkjsf-16 --- diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/data/ResponseParser.java b/src/main/java/com/indexdata/mkjsf/pazpar2/data/ResponseParser.java index 8036a29..b38cb66 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/data/ResponseParser.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/data/ResponseParser.java @@ -129,7 +129,7 @@ public class ResponseParser extends DefaultHandler { currentElement = new Pazpar2VersionResponse(); } else if (localName.equals("applicationerror")) { currentElement = new CommandError(); - } else if (localName.equals("error") && dataElements.peek().getType().equals("applicationerror")) { + } else if (localName.equals("error") && (!dataElements.isEmpty() && dataElements.peek().getType().equals("applicationerror"))) { currentElement = new ServiceError(); // Service Proxy extras } else if (localName.equals("auth")) {