[ 
https://issues.apache.org/jira/browse/ARTEMIS-5150?focusedWorklogId=943310&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-943310
 ]

ASF GitHub Bot logged work on ARTEMIS-5150:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Nov/24 12:57
            Start Date: 12/Nov/24 12:57
    Worklog Time Spent: 10m 
      Work Description: gaohoward commented on code in PR #5340:
URL: https://github.com/apache/activemq-artemis/pull/5340#discussion_r1838057697


##########
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:
   +1, returning null would reflect the truth (without depending on default 
behavior)
   





Issue Time Tracking
-------------------

    Worklog Id:     (was: 943310)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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


Reply via email to