You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2013/01/31 20:22:09 UTC
svn commit: r1441148 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
Author: degenaro
Date: Thu Jan 31 19:22:09 2013
New Revision: 1441148
URL: http://svn.apache.org/viewvc?rev=1441148&view=rev
Log:
UIMA-2629 DUCC orchestrator (OR) takes NPE when cancel is attempted to non-existing reservation
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java?rev=1441148&r1=1441147&r2=1441148&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java Thu Jan 31 19:22:09 2013
@@ -849,8 +849,8 @@ implements Orchestrator {
if(elapsed > Constants.SYNC_LIMIT) {
logger.debug(methodName, dwid, "elapsed msecs: "+elapsed);
}
- if(Validate.request(duccEvent,duccWorkReservation)) {
- if(duccWorkReservation != null) {
+ if(duccWorkReservation != null) {
+ if(Validate.request(duccEvent,duccWorkReservation)) {
dwid = duccWorkReservation.getDuccId();
String reqUser = properties.getProperty(JobRequestProperties.key_user).trim();
String reqRole = getRole(properties);
@@ -884,16 +884,16 @@ implements Orchestrator {
}
}
else {
- // prepare undefined reply
- properties.put(ReservationReplyProperties.key_message, ReservationReplyProperties.msg_not_found);
+ properties.put(ReservationReplyProperties.key_message, ReservationReplyProperties.msg_user_not_authorized);
duccEvent.setProperties(properties);
- logger.info(methodName, dwid, id+" : "+messages.fetch("reservation not found"));
+ logger.info(methodName, dwid, id+" : "+messages.fetch("not authorized"));
}
}
else {
- properties.put(ReservationReplyProperties.key_message, ReservationReplyProperties.msg_user_not_authorized);
+ // prepare undefined reply
+ properties.put(ReservationReplyProperties.key_message, ReservationReplyProperties.msg_not_found);
duccEvent.setProperties(properties);
- logger.info(methodName, dwid, id+" : "+messages.fetch("not authorized"));
+ logger.info(methodName, dwid, id+" : "+messages.fetch("reservation not found"));
}
}
logger.trace(methodName, dwid, messages.fetch("exit"));