From 8eb65febb84af1472513fdecbf9553817d2ab93b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 6 Nov 2014 07:30:37 +0100 Subject: fix Nullpointer if UR result includes a FunktionsRegel without a date --- src/main/java/at/gv/util/client/ur_V5/URClient.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/gv/util/client/ur_V5/URClient.java b/src/main/java/at/gv/util/client/ur_V5/URClient.java index 537ed25..59bf501 100644 --- a/src/main/java/at/gv/util/client/ur_V5/URClient.java +++ b/src/main/java/at/gv/util/client/ur_V5/URClient.java @@ -233,7 +233,20 @@ public class URClient { if (this.allowedERsBKeys.contains(String.valueOf(funct.getFktName()))) { List functRegel = funct.getFktRegel(); for (FktRegelTypVollzug el : functRegel) { - if ( (el.getFktRegelVon().compare(xmldate) == DatatypeConstants.LESSER + if ( el.getFktRegelVon() == null && el.getFktRegelBis() == null) + set.add(String.valueOf(funct.getFktName())); + + else if ( el.getFktRegelVon() != null && el.getFktRegelBis() == null + && el.getFktRegelVon().compare(xmldate) == DatatypeConstants.LESSER ) + set.add(String.valueOf(funct.getFktName())); + + else if ( el.getFktRegelVon() == null && el.getFktRegelBis() != null + && el.getFktRegelBis().compare(xmldate) == DatatypeConstants.GREATER ) + set.add(String.valueOf(funct.getFktName())); + + + else if ( el.getFktRegelVon() != null && el.getFktRegelBis() != null + && (el.getFktRegelVon().compare(xmldate) == DatatypeConstants.LESSER && el.getFktRegelBis().compare(xmldate) == DatatypeConstants.GREATER) ) set.add(String.valueOf(funct.getFktName())); -- cgit v1.2.3