From 69475d1ca29ac530df84153635119adf908cbb53 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Thu, 20 Feb 2014 18:07:42 +0100 Subject: handling errors when configuration entries are non existent --- .../egovernment/moa/id/config/stork/STORKConfig.java | 18 +++++++++++++++--- .../moa/id/protocols/stork2/MOASTORKAuthnRequest.java | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'id/server/idserverlib') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java index ff481b825..f79fd6e17 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java @@ -59,8 +59,14 @@ public class STORKConfig { this.props = props; //create CPEPS map - List cpeps = stork.getCPEPS(); - + List cpeps = null; + + try { + cpeps = stork.getCPEPS(); + } catch (NullPointerException ex) { + Logger.error("CPEPS not configured!"); + } + cpepsMap = new HashMap(); if (cpeps != null) { @@ -79,11 +85,17 @@ public class STORKConfig { } attr = new ArrayList(); - if (stork.getAttributes() != null) { + + try { + if (stork.getAttributes() != null) { for(StorkAttribute current : stork.getAttributes()) { attr.add(current); } } + } catch (NullPointerException ex) { + Logger.error("Attributes not configured!"); + + } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java index c9fb136c9..cee64e16e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java @@ -25,6 +25,7 @@ public class MOASTORKAuthnRequest implements IRequest { } public String getOAURL() { + return "https://sp:8889/SP"; // } -- cgit v1.2.3