qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lqu...@apache.org
Subject svn commit: r1791268 - /qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
Date Thu, 13 Apr 2017 15:06:55 GMT
Author: lquack
Date: Thu Apr 13 15:06:55 2017
New Revision: 1791268

URL: http://svn.apache.org/viewvc?rev=1791268&view=rev
Log:
QPID-7744: [Java Broker] Fix NPE in AbstractVirtualHost$MessageHeaderImpl when there is no
user principal

Modified:
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1791268&r1=1791267&r2=1791268&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
(original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
Thu Apr 13 15:06:55 2017
@@ -1703,7 +1703,8 @@ public abstract class AbstractVirtualHos
         public MessageHeaderImpl(final ManageableMessage message)
         {
             _message = message;
-            _userName = AuthenticatedPrincipal.getCurrentUser().getName();
+            final AuthenticatedPrincipal currentUser = AuthenticatedPrincipal.getCurrentUser();
+            _userName = (currentUser == null ? null : currentUser.getName());
             _timestamp = System.currentTimeMillis();
         }
 



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


Mime
View raw message