summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-09-17 02:51:22 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-09-17 02:51:22 +0000
commit68befac598d4146143903d0cae5ae644cdb9d445 (patch)
treeabc0ba3643c96e7ffe6bd8c0859867339d939f2a /qpid/java
parent3e5fb5a51da0a59f3502873a1e8688c362ef14d0 (diff)
downloadqpid-python-68befac598d4146143903d0cae5ae644cdb9d445.tar.gz
QPID-2861
Added a simple null check to eliminate acting on a result that is no longer valid. I am also adding a log message at "WARN" level if we receive a result for a command that is no longer in our map. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@997965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
index 52e0026f29..c891c95151 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
@@ -767,7 +767,17 @@ public class Session extends SessionInvoker
{
future = results.remove(command);
}
- future.set(result);
+
+ if (future != null)
+ {
+ future.set(result);
+ }
+ else
+ {
+ log.warn("Broker sent a result in response to a command" +
+ " that's no longer valid on the client side." +
+ " [ command id : %s , result : %s ]",command, result);
+ }
}
void setException(ExecutionException exc)