mirror of https://github.com/apache/activemq.git
Fixed some npe I'd just introduced
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c82f6f3309
commit
2eae0548d8
|
@ -129,7 +129,6 @@ public class ManagedRegionBroker extends RegionBroker{
|
|||
}
|
||||
|
||||
public void registerSubscription(ConnectionContext context,Subscription sub){
|
||||
// NEED CONTEXT TO GET CLIENT ID AND USE Subscription KEY!!!
|
||||
SubscriptionKey key = new SubscriptionKey(context.getClientId(),sub.getConsumerInfo().getSubcriptionName());
|
||||
Hashtable map=new Hashtable(brokerObjectName.getKeyPropertyList());
|
||||
map.put("Type",JMXSupport.encodeObjectNamePart("Subscription"));
|
||||
|
|
|
@ -90,7 +90,7 @@ public class RegionBroker implements Broker {
|
|||
public RegionBroker(BrokerService brokerService,TaskRunnerFactory taskRunnerFactory, UsageManager memoryManager, PersistenceAdapter adapter, PolicyMap policyMap) throws IOException {
|
||||
this.brokerService = brokerService;
|
||||
this.sequenceGenerator.setLastSequenceId( adapter.getLastMessageBrokerSequenceId() );
|
||||
this.adaptor = adaptor;
|
||||
this.adaptor = adapter;//weird - both are valid spellings ...
|
||||
queueRegion = createQueueRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
|
||||
topicRegion = createTopicRegion(memoryManager, taskRunnerFactory, adapter, policyMap);
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ public class SubscriptionKey {
|
|||
|
||||
public SubscriptionKey(String clientId, String subscriptionName) {
|
||||
this.clientId = clientId;
|
||||
this.subscriptionName = subscriptionName;
|
||||
hashValue = clientId.hashCode()^subscriptionName.hashCode();
|
||||
this.subscriptionName = subscriptionName != null? subscriptionName : "NOT_SET";
|
||||
hashValue = clientId.hashCode()^this.subscriptionName.hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue