From ede744e9af545db61a0d46f44279a4a8a216c633 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 17 Apr 2014 17:24:53 +0200 Subject: fix NullPointer if representative has no OID --- .../moa/id/util/client/mis/simple/MISMandate.java | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'id/server/idserverlib/src/main/java/at/gv') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java index 385dd753c..f7785d2c2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java @@ -48,6 +48,8 @@ package at.gv.egovernment.moa.id.util.client.mis.simple; import java.io.Serializable; +import at.gv.egovernment.moa.util.MiscUtil; + public class MISMandate implements Serializable{ private static final long serialVersionUID = 1L; @@ -90,16 +92,21 @@ public class MISMandate implements Serializable{ } public String getTextualDescriptionOfOID() { - if (this.oid.equalsIgnoreCase(OID_NOTAR)) - return TEXT_NOTAR; - if (this.oid.equalsIgnoreCase(OID_RECHTSANWALT)) - return TEXT_RECHTSANWALT; - if (this.oid.equalsIgnoreCase(OID_ZIVILTECHNIKER)) - return TEXT_ZIVILTECHNIKER; - if (this.oid.equalsIgnoreCase(OID_ORGANWALTER)) - return TEXT_ORGANWALTER; + if (MiscUtil.isNotEmpty(this.oid)) { + if (this.oid.equalsIgnoreCase(OID_NOTAR)) + return TEXT_NOTAR; + if (this.oid.equalsIgnoreCase(OID_RECHTSANWALT)) + return TEXT_RECHTSANWALT; + if (this.oid.equalsIgnoreCase(OID_ZIVILTECHNIKER)) + return TEXT_ZIVILTECHNIKER; + if (this.oid.equalsIgnoreCase(OID_ORGANWALTER)) + return TEXT_ORGANWALTER; - return "Keine textuelle Beschreibung für OID " + oid; + return "Keine textuelle Beschreibung für OID " + oid; + + } else { + return null; + } } -- cgit v1.2.3