mirror of https://github.com/apache/activemq.git
improve error reporting from classcast
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@773986 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b4ce4aaf2
commit
dd1b847ad7
|
@ -86,7 +86,12 @@ public class ResponseCorrelator extends TransportFilter {
|
|||
}
|
||||
|
||||
public void onCommand(Object o) {
|
||||
Command command = (Command)o;
|
||||
Command command = null;
|
||||
if (o instanceof Command) {
|
||||
command = (Command)o;
|
||||
} else {
|
||||
throw new ClassCastException("Object cannot be converted to a Command, Object: " + o);
|
||||
}
|
||||
if (command.isResponse()) {
|
||||
Response response = (Response)command;
|
||||
FutureResponse future = null;
|
||||
|
|
Loading…
Reference in New Issue