aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-20 18:07:42 +0100
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-20 18:07:42 +0100
commit69475d1ca29ac530df84153635119adf908cbb53 (patch)
tree7b7045d72f49959c3dbe232d3b6d59d39406a15d /id/server/idserverlib/src/main/java/at/gv
parentc08c4b0c65a0fa1884f4bb6d0a9f73ef7ce1b85d (diff)
downloadmoa-id-spss-69475d1ca29ac530df84153635119adf908cbb53.tar.gz
moa-id-spss-69475d1ca29ac530df84153635119adf908cbb53.tar.bz2
moa-id-spss-69475d1ca29ac530df84153635119adf908cbb53.zip
handling errors when configuration entries are non existent
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java18
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java1
2 files changed, 16 insertions, 3 deletions
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<at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS> cpeps = stork.getCPEPS();
-
+ List<at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS> cpeps = null;
+
+ try {
+ cpeps = stork.getCPEPS();
+ } catch (NullPointerException ex) {
+ Logger.error("CPEPS not configured!");
+ }
+
cpepsMap = new HashMap<String, CPEPS>();
if (cpeps != null) {
@@ -79,11 +85,17 @@ public class STORKConfig {
}
attr = new ArrayList<StorkAttribute>();
- 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"; //
}