Discussion: Interpretation of system property flags
Roger Riggs
roger.riggs at oracle.com
Fri Dec 13 16:55:42 UTC 2024
Hi Eirik,
The lack of `Boolean.getBoolean(String propName, boolean default)`
encourages
developers to roll their own. If it were easier get the desired default
from the built-in
boolean property API it would fit more use cases.
It might be a small step to take advantage of your analysis and be a
useful addition to the API.
There is usually less engagement during the later half of December, so
it might be a while before any support is evident.
$.02, Roger
On 12/4/24 12:57 PM, Eirik Bjørsnøs wrote:
>
> There are at least three issues at play here:
>
> a: Some flags use inconsistent, confusing, controversial or
> less-than-perfect interpretations
> b: Some flags use identical interpretations, yet their evaluation
> happens in copy-pasted code spread across the code base
> c: Some flags use identical interpretations, yet the code written
> to evaluate that interpretation varies a lot across the code base
>
>
> Let me add:
> d: Maintainers introducing new flags lack guidance for picking a
> "good" flag interpretation
> e: Maintainers introducing new flags must write new code to read the
> property value and reduce the following to a boolean: [null | empty |
> "true" | "TRUE" | "false" | "FALSE" | "unrelated"]
>
> Eirik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20241213/0648d54c/attachment-0001.htm>
More information about the core-libs-dev
mailing list