stackabletech / product-config

A library to validate product configuration properties with regard to version, data type, minimum and maximum bounds, dependencies and roles
Apache License 2.0
2 stars 1 forks source link

Java properties: don't write quotes for empty strings #88

Closed nightkr closed 1 year ago

nightkr commented 1 year ago

Description

That is, ("foo", Some("")) will now be serialized as foo= rather than foo="".

This is because Java (or at least Kafka...) seems to interpret the latter as a string literally containing the characters "".

Review Checklist

lfrancke commented 1 year ago

I'm afraid to run a blame on the original code but I'm willing to bet that this was a delibarate move because some other tool does need those quotes in some scenarios under a full moon.

nightkr commented 1 year ago

It seems to date back to https://github.com/stackabletech/product-config/pull/25/files#r661547454, and originally came from c784188a3d2213004cec7c2ef16672e6a8dd3eb6...

lfrancke commented 1 year ago

I don't see a justificaton there. I think the Java properties javadoc can be misread/misinterpreted in a way that an empty value is "". So, I'm fine wtih the change in general.

nightkr commented 1 year ago

@razvan / @maltesander what do you think?

nightkr commented 1 year ago

bors r+

bors[bot] commented 1 year ago

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.