diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-05-12 15:44:10 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-05-12 15:44:10 +0200 |
commit | 6981edb4e01d3c2300b47429a1ab40f7eaa35c1b (patch) | |
tree | 16cdff92f180d7adf424cd2b5d5acdf9585cbbad /id/server/idserverlib/src/main/java/at | |
parent | 9b9f042a25d3a1cde69f9dd4d576243317991a2a (diff) | |
download | moa-id-spss-6981edb4e01d3c2300b47429a1ab40f7eaa35c1b.tar.gz moa-id-spss-6981edb4e01d3c2300b47429a1ab40f7eaa35c1b.tar.bz2 moa-id-spss-6981edb4e01d3c2300b47429a1ab40f7eaa35c1b.zip |
fix possible nullPointer exception in process engine
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java index f9986dccb..76e6605c1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java @@ -129,6 +129,11 @@ public class ProcessEngineImpl implements ProcessEngine { ProcessInstance pi = loadProcessInstance(pendingReq.getProcessInstanceId()); + if (pi == null ) { + throw new ProcessExecutionException("Process instance '" + pendingReq.getProcessInstanceId() + "' does not exist."); + + } + MDC.put(MDC_CTX_PI_NAME, pi.getId()); if (!ProcessInstanceState.NOT_STARTED.equals(pi.getState())) { @@ -164,6 +169,11 @@ public class ProcessEngineImpl implements ProcessEngine { ProcessInstance pi = loadProcessInstance(pendingReq.getProcessInstanceId()); + if (pi == null ) { + throw new ProcessExecutionException("Process instance '" + pendingReq.getProcessInstanceId() + "' does not exist."); + + } + MDC.put(MDC_CTX_PI_NAME, pi.getId()); if (!ProcessInstanceState.SUSPENDED.equals(pi.getState())) { |