aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-04-14 16:57:02 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-04-14 16:57:02 +0200
commit70aa50b21c2e9ef9318ed72ae90a67d984db33a7 (patch)
treeb925d32e2ae61f88fcb302253a17aaa70a8ec30e
parent2a4c182dd0209a6b9321d7f38a977eb1046de165 (diff)
downloadmoa-id-spss-70aa50b21c2e9ef9318ed72ae90a67d984db33a7.tar.gz
moa-id-spss-70aa50b21c2e9ef9318ed72ae90a67d984db33a7.tar.bz2
moa-id-spss-70aa50b21c2e9ef9318ed72ae90a67d984db33a7.zip
fix possible NullPointerException if no OA is found
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
index 26d97484b..82390c49c 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
@@ -291,13 +291,17 @@ public class BasicOAAction extends BasicAction {
} else {
- if (oaid == -1) {
+ if (oaid == -1) {
List<OnlineApplication> oaList = ConfigurationDBRead.getAllOnlineApplications();
- for (OnlineApplication el : oaList) {
- if (el.getPublicURLPrefix().startsWith(oaidentifier) )
- onlineapplication = el;
+
+ if (oaList != null) {
+ for (OnlineApplication el : oaList) {
+ if (el.getPublicURLPrefix().startsWith(oaidentifier) )
+ onlineapplication = el;
+ }
}
+
if (onlineapplication == null) {
onlineapplication = ConfigurationDBRead.getOnlineApplication(oaidentifier);