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

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

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


##########
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:
   should a default not be in the configuration rather than in the server 
control.
   I think primary only is a sensible default, but I would also expect an 
embedded broker to provide configuration values that it cares about rather than 
depend on defaults. Defaults will only cover some subset at some time.
   





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

    Worklog Id:     (was: 943293)
    Time Spent: 20m  (was: 10m)

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