diff options
Diffstat (limited to 'qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java')
-rw-r--r-- | qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java index 8a52d31f97..a9ec4d1647 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java @@ -18,13 +18,17 @@ */ package org.apache.qpid.server.security.access; -import java.util.*; - import org.apache.commons.lang.StringUtils; + import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.server.exchange.Exchange; import org.apache.qpid.server.queue.AMQQueue; +import java.util.ArrayList; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; + /** * An set of properties for an access control v2 rule {@link ObjectType}. * @@ -315,19 +319,28 @@ public class ObjectProperties || ruleValue.equals(STAR) || (ruleValue.endsWith(STAR) && thisValue != null - && thisValue.length() > ruleValue.length() - && thisValue.startsWith(ruleValue.substring(0, ruleValue.length() - 2))); + && thisValue.length() >= ruleValue.length() - 1 + && thisValue.startsWith(ruleValue.substring(0, ruleValue.length() - 1))); } @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) + { + return true; + } + if (o == null || getClass() != o.getClass()) + { + return false; + } ObjectProperties that = (ObjectProperties) o; - if (_properties != null ? !_properties.equals(that._properties) : that._properties != null) return false; + if (_properties != null ? !_properties.equals(that._properties) : that._properties != null) + { + return false; + } return true; } |