Skip to content

Conversation

@clebertsuconic
Copy link
Contributor

No description provided.

@clebertsuconic
Copy link
Contributor Author

@gtully this one caught me as I thought my stuff was causing it. totally unrelated but here is the fix.

@clebertsuconic
Copy link
Contributor Author

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.

@clebertsuconic clebertsuconic merged commit a9ee1c7 into apache:main Jan 27, 2026
6 checks passed
nested.push(entry.getKey().toString());
export(beanUtils, nested, bufferedWriter, entry.getValue());
nested.pop();
if (entry.getValue() != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ''

// 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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for sure should not throw, but should not loose info... I think it should be:

...params.useKQueue=

Copy link
Contributor

@gtully gtully left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need more consistency here on how to deal with null values.

@clebertsuconic
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants