[
https://issues.apache.org/jira/browse/ARTEMIS-5863?focusedWorklogId=1002687&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1002687
]
ASF GitHub Bot logged work on ARTEMIS-5863:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jan/26 14:38
Start Date: 30/Jan/26 14:38
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #6201:
URL: https://github.com/apache/artemis/pull/6201#discussion_r2746613584
##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java:
##########
@@ -3042,6 +3044,13 @@ public void testExportInvalidPropertyOnAcceptor() throws
Exception {
configuration.addAcceptorConfiguration("test",
"tcp://0.0.0.0:61616?useKQueue");
File fileOutput = new File(getTestDirfile(), "broker.properties");
assertDoesNotThrow(() -> configuration.exportAsProperties(fileOutput));
+ Properties properties = new Properties();
+ try (InputStream inStream = Files.newInputStream(fileOutput.toPath())) {
+ properties.load(inStream);
+ }
+ assertFalse(properties.isEmpty());
+
assertTrue(properties.containsKey("acceptorConfigurations.test.params.useKQueue"));
+ assertEquals("",
properties.get("acceptorConfigurations.test.params.useKQueue"));
Review Comment:
just thinking now... I guess we should settle with empty strings...
otherwise things can get messy
what if you make it null on an existing configuration.
It's kind of difficult to mess with setting as it could mess with existing
configurations. Hard to predict
Issue Time Tracking
-------------------
Worklog Id: (was: 1002687)
Time Spent: 2h (was: 1h 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: 2h
> 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]