summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2012-01-04 13:08:54 +0000
committerRobert Godfrey <rgodfrey@apache.org>2012-01-04 13:08:54 +0000
commitefc18e5b96975ab21b834f7c3c53e39167786016 (patch)
treebfde68457cd9f8db3cd10e240c55bf568f6a2910 /qpid/java
parentfc91b6dba0e2c6c16cd28edae63fbd1c321bc101 (diff)
downloadqpid-python-efc18e5b96975ab21b834f7c3c53e39167786016.tar.gz
QPID-3714 : Fix for NPE in the SecurityManager when a null routing key is used in 0-10
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1227142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
index 7d4748bcaa..2a1ae8a870 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
@@ -389,8 +389,16 @@ public class SecurityManager
private ConcurrentHashMap<String, ConcurrentHashMap<String, PublishAccessCheck>> _publishPropsCache
= new ConcurrentHashMap<String, ConcurrentHashMap<String, PublishAccessCheck>>();
- public boolean authorisePublish(final boolean immediate, final String routingKey, final String exchangeName)
+ public boolean authorisePublish(final boolean immediate, String routingKey, String exchangeName)
{
+ if(routingKey == null)
+ {
+ routingKey = "";
+ }
+ if(exchangeName == null)
+ {
+ exchangeName = "";
+ }
PublishAccessCheck check;
ConcurrentHashMap<String, ConcurrentHashMap<String, PublishAccessCheck>> cache =
immediate ? _immediatePublishPropsCache : _publishPropsCache;