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

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

                Author: ASF GitHub Bot
            Created on: 28/Jan/26 13:32
            Start Date: 28/Jan/26 13:32
    Worklog Time Spent: 10m 
      Work Description: gtully commented on code in PR #6199:
URL: https://github.com/apache/artemis/pull/6199#discussion_r2736657271


##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java:
##########
@@ -3033,6 +3034,16 @@ public void 
testSecuritySettingPluginFromBrokerProperties() throws Exception {
       assertTrue(configuration.getStatus().contains("initialContextFactory"));
    }
 
+   @Test
+   public void testExportInvalidPropertyOnAcceptor() throws Exception {
+      ConfigurationImpl configuration = new ConfigurationImpl();
+
+      // useKQueue here would generate a hashMap Value null, what would break 
the exportAsProperties.
+      configuration.addAcceptorConfiguration("test", 
"tcp://0.0.0.0:61616?useKQueue");
+      File fileOutput = new File(getTestDirfile(), "broker.properties");
+      assertDoesNotThrow(() -> configuration.exportAsProperties(fileOutput));

Review Comment:
   for sure should not throw, but should not loose info... I think it should be:
   
   ...params.useKQueue=





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

    Worklog Id:     (was: 1002250)
    Time Spent: 1h  (was: 50m)

> Configuration export as properties would throw NPE for invalid acceptor URIs
> ----------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5863
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5863
>             Project: Artemis
>          Issue Type: Bug
>    Affects Versions: 2.50.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.51.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> say you specify the following URI:
>       configuration.addAcceptorConfiguration("test", 
> "tcp://0.0.0.0:61616?useKQueue");
> useKQueue would generate a null value on the HashMap, which would throw a NPE 
> during export.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to