Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/359#discussion_r21036362
--- Diff:
software/messaging/src/main/java/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java
---
@@ -52,4 +57,12 @@ public void onManagementStarting() {
protected void disconnectSensors() {
if (jmxFeed != null) jmxFeed.stop();
}
+
+ protected String getBrokerName() {
+ if (brokerName == null) {
+ EntityLocal parent = (EntityLocal)getParent();
+ brokerName = parent != null ?
parent.getAttribute(ActiveMQBroker.BROKER_NAME) : null;
--- End diff --
Will `parent` ever be null? I think it's an error if an
`ActiveMQDestination` has no `ActiveMQBroker` parent. So perhaps this whole
method could be replaced with a simple `return
getParent().getAttribute(ActiveMQBroker.BROKER_NAME)`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---