You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/08/15 12:14:25 UTC

svn commit: r1618139 - /qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java

Author: rgodfrey
Date: Fri Aug 15 10:14:24 2014
New Revision: 1618139

URL: http://svn.apache.org/r1618139
Log:
QPID-6002 : [Java Broker] NullPointerException when writing message discard logging message

Modified:
    qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java

Modified: qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java?rev=1618139&r1=1618138&r2=1618139&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java Fri Aug 15 10:14:24 2014
@@ -474,13 +474,12 @@ public class AMQChannel<T extends AMQPro
         }
         else
         {
-            getVirtualHost().getEventLogger().message(ExchangeMessages.DISCARDMSG(_currentMessage.getExchangeName().asString(),
-                                                          _currentMessage.getMessagePublishInfo().getRoutingKey()
-                                                          == null
-                                                                  ? null
-                                                                  : _currentMessage.getMessagePublishInfo()
-                                                                          .getRoutingKey()
-                                                                          .toString()));
+            AMQShortString exchangeName = _currentMessage.getExchangeName();
+            AMQShortString routingKey = _currentMessage.getMessagePublishInfo().getRoutingKey();
+
+            getVirtualHost().getEventLogger().message(
+                    ExchangeMessages.DISCARDMSG(exchangeName == null ? null : exchangeName.asString(),
+                                                routingKey == null ? null : routingKey.asString()));
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org