aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-02-20 17:02:13 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-02-20 17:02:13 +0100
commitaddd90ec1f988bcae99890d1008175c12a98068c (patch)
tree58b53e21262c4d7d8a1b1625adb4fb70e17ece52
parentf5b8151aa849d58b8962a9a9921be39d58a5ea85 (diff)
downloadmoa-id-spss-addd90ec1f988bcae99890d1008175c12a98068c.tar.gz
moa-id-spss-addd90ec1f988bcae99890d1008175c12a98068c.tar.bz2
moa-id-spss-addd90ec1f988bcae99890d1008175c12a98068c.zip
BugFix: STORK -> MOA-ID-AUTH NullPointerException if no STORK configuration exist
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java23
1 files changed, 13 insertions, 10 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 463930fd7..ff481b825 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
@@ -63,23 +63,26 @@ public class STORKConfig {
cpepsMap = new HashMap<String, CPEPS>();
- for(at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS cpep : cpeps) {
+ if (cpeps != null) {
+ for(at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS cpep : cpeps) {
- try {
- CPEPS moacpep = new CPEPS(cpep.getCountryCode(), new URL(cpep.getURL()));
+ try {
+ CPEPS moacpep = new CPEPS(cpep.getCountryCode(), new URL(cpep.getURL()));
- cpepsMap.put(cpep.getCountryCode(), moacpep);
+ cpepsMap.put(cpep.getCountryCode(), moacpep);
- } catch (MalformedURLException e) {
- Logger.warn("Error in MOA-ID Configuration. CPEP entry for country "
- + cpep.getCountryCode() + " has an invalid URL and is ignored.");
+ } catch (MalformedURLException e) {
+ Logger.warn("Error in MOA-ID Configuration. CPEP entry for country "
+ + cpep.getCountryCode() + " has an invalid URL and is ignored.");
+ }
}
}
-
attr = new ArrayList<StorkAttribute>();
- for(StorkAttribute current : stork.getAttributes()) {
- attr.add(current);
+ if (stork.getAttributes() != null) {
+ for(StorkAttribute current : stork.getAttributes()) {
+ attr.add(current);
+ }
}
}