Author: rgodfrey
Date: Mon May 11 13:26:21 2015
New Revision: 1678752
URL: http://svn.apache.org/r1678752
Log:
QPID-6234 : Fix NPE in ServerSessionDelegate when message.subscribe destination
is null (applied patch from Lorenz Quack)
Modified:
qpid/java/trunk/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
Modified:
qpid/java/trunk/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
URL:
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java?rev=1678752&r1=1678751&r2=1678752&view=diff
==============================================================================
---
qpid/java/trunk/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
(original)
+++
qpid/java/trunk/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
Mon May 11 13:26:21 2015
@@ -201,7 +201,11 @@ public class ServerSessionDelegate exten
{
String destination = method.getDestination();
- if(((ServerSession)session).getSubscription(destination)!=null)
+ if (destination == null)
+ {
+ exception(session, method,
ExecutionErrorCode.INVALID_ARGUMENT, "Subscriber must provide a destination.
The protocol specification marking the destination argument as optional is
considered a mistake.");
+ }
+ else if(((ServerSession)session).getSubscription(destination) !=
null)
{
exception(session, method, ExecutionErrorCode.NOT_ALLOWED,
"Subscription already exists with destination '"+destination+"'");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]