aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2015-09-16 19:17:40 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2015-09-16 19:17:40 +0200
commit01b08361d21a6c0efab965850e0fe2d160cbabcc (patch)
tree9affa99a88be0b026f0007ef134fad4e5ef601e4 /id/ConfigWebTool/src/main/java
parentc5eb50a0010a0250802afcbe3b7694b814071b76 (diff)
downloadmoa-id-spss-01b08361d21a6c0efab965850e0fe2d160cbabcc.tar.gz
moa-id-spss-01b08361d21a6c0efab965850e0fe2d160cbabcc.tar.bz2
moa-id-spss-01b08361d21a6c0efab965850e0fe2d160cbabcc.zip
fix possible NullPointerException in STORK configuration
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
index a042a7931..b69d37d57 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
@@ -67,14 +67,16 @@ public class StorkConfigValidator {
}
}
- // ensure uniqueness of country code
- for (CPEPS one : form.getCpepslist())
- for (CPEPS another : form.getCpepslist())
- if (null != one && null != another)
- if (!one.equals(another) && one.getCountryCode().equals(another.getCountryCode())) {
- errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.duplicate", request));
- break;
- }
+ if (form.getCpepslist() != null) {
+ // ensure uniqueness of country code
+ for (CPEPS one : form.getCpepslist())
+ for (CPEPS another : form.getCpepslist())
+ if (null != one && null != another)
+ if (!one.equals(another) && one.getCountryCode().equals(another.getCountryCode())) {
+ errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.duplicate", request));
+ break;
+ }
+ }
}
// check qaa