From d237859420496f6d1f183d0f64bf2f78b0799fc0 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Wed, 6 May 2015 22:16:14 +0200 Subject: [PATCH] Intercepts empty-stack exc, rec-cmd. mkjsf-16 --- src/main/java/com/indexdata/mkjsf/pazpar2/data/ResponseParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")) { -- 1.7.10.4