You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "clebertsuconic (via GitHub)" <gi...@apache.org> on 2026/01/27 22:00:26 UTC
[PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
clebertsuconic opened a new pull request, #6199:
URL: https://github.com/apache/artemis/pull/6199
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on code in PR #6199:
URL: https://github.com/apache/artemis/pull/6199#discussion_r2736651704
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java:
##########
@@ -1105,10 +1105,12 @@ private void export(BeanUtilsBean beanUtils, Stack<String> nested, BufferedWrite
stream = stream.filter((Map.Entry<?, ?> entry)-> filterOn.isAssignableFrom(entry.getClass()));
}
stream.forEach(entry -> {
- // nested by name
- nested.push(entry.getKey().toString());
- export(beanUtils, nested, bufferedWriter, entry.getValue());
- nested.pop();
+ if (entry.getValue() != null) {
Review Comment:
this is inconsistent. the check for null to not export a key with for a null value
and the use of String.ValueOf that will write key="null" for a null value.
we should be consistent and write key= for null values and not introduce "null" as we don't understand that as a config value.
This means we need to check for a null value and write an empty string ''
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #6199:
URL: https://github.com/apache/artemis/pull/6199#issuecomment-3807746546
@gtully this one caught me as I thought my stuff was causing it. totally unrelated but here is the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic merged PR #6199:
URL: https://github.com/apache/artemis/pull/6199
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "gtully (via GitHub)" <gi...@apache.org>.
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=
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #6199:
URL: https://github.com/apache/artemis/pull/6199#issuecomment-3807840495
I need to merge this as I'm writing another test on top of the same test.
If anything is needed I will followup with another PR or commit. please let me know on that case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5863 invalid acceptor URI shouldn't break configuration.exportAsProperties with NPE [artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #6199:
URL: https://github.com/apache/artemis/pull/6199#issuecomment-3811411573
BTW: String.valueOf is not fixing anything here.. this is just the proper way to call .toString on the recent JDK versions.
I'm not really sure we should do pararams.useKQueue= the return would be an empty string.
if you keep expanding on this you would have a much bigger task... and I can't do it now.
At this moment all I did was to fix and avoid the NPE as it was failing to export stuff.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org