[
https://issues.apache.org/jira/browse/ARTEMIS-5150?focusedWorklogId=943297&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-943297
]
ASF GitHub Bot logged work on ARTEMIS-5150:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/Nov/24 12:05
Start Date: 12/Nov/24 12:05
Worklog Time Spent: 10m
Work Description: gtully commented on code in PR #5340:
URL: https://github.com/apache/activemq-artemis/pull/5340#discussion_r1837989702
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java:
##########
@@ -834,7 +835,12 @@ public int getAddressMemoryUsagePercentage() {
@Override
public String getHAPolicy() {
- return configuration.getHAPolicyConfiguration().getType().getName();
+ HAPolicyConfiguration haConfig =
configuration.getHAPolicyConfiguration();
Review Comment:
It should avoid the NPE, and maybe return null if the policy is null.
Issue Time Tracking
-------------------
Worklog Id: (was: 943297)
Time Spent: 0.5h (was: 20m)
> ActiveMQServerControlImpl.getHAPolicy() gets NullPointerException
> -----------------------------------------------------------------
>
> Key: ARTEMIS-5150
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5150
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: management
> Affects Versions: 2.38.0
> Reporter: Howard Gao
> Assignee: Howard Gao
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When you start the broker without configuring HAPolicy, if clients
> call this management api it'll get NPE because it doesn't check if the
> HAPolicyConfiguration is null.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact