AuthMe / ConfigMe

A simple configuration management library for any Java project!
MIT License
37 stars 14 forks source link

String inline array property - more flavors? #382

Open ljacqu opened 11 months ago

ljacqu commented 11 months ago

I've changed the inline array property type to also consider a final empty entry if the string ends with the separator. This is only (really) relevant for the string type, where the following string:

"test
test
" // <-- empty line

previously produced an array ["test", "test"]—now, it produces ["test", "test", ""].

I think this is more consistent. In the scope of this change, though, some general thoughts about the inline array type came up:

Unfortunately, searching over the entirety of GitHub for "InlineArrayConverter" (the pre-ConfigMe 2 name) does not show any usages of the inline array. I have trouble seeing use cases for this type, besides a) if you want to comma-separate a few values and not take too much space in the config file; or rather, b) some file formats don't support collections (like .properties)