RFR: 8345883: Relax system property "stackwalk.debug" in StackStreamFactory to be case insensitive

Roger Riggs rriggs at openjdk.org
Tue Dec 10 16:03:39 UTC 2024


On Tue, 10 Dec 2024 11:16:55 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> Please review this PR which relaxes the interpretation of the system property `stackwalk.debug` in `java.lang.StackStreamFactory` to be case insensitive.
> 
> Motivation:
> Only 5 of 83 boolean system properties in `java.base` have a case sensitive interpretation. Relaxing these to be case insensitive will improve consistency across the code base and simplifies our reasoning about such system properties.
> 
> The `stackwalk.debug` property was introduced when JEP-259 was integrated in JDK-8143911. The property was not mentioned in the CCC for this change, neither in the JEP. Seems like an undocumented, internal debug facility for development and maintenance purposes.
> 
> Risk:
> This should be a low risk change. The property is used for debugging, and the change will shift the interpretation of "TRUE" from false to true. Any user specifying `-Dstackwalk.debug=TRUE` probably meant to enable it.
> 
> Verification:
> Manually verified that `-Dstackwalk.debug=TRUE` and `-Dstackwalk.debug=true` enables debugging and that `-Dstackwalk.debug=false`, `-Dstackwalk.debug` and `-Dstackwalk.debug=abc` does not enable it.

It looks to be trivial and compatible (because it is more lenient).

But there is no need for boolean properties to be case insensitive.
The reading and writing the literal values spec'd by the language.
This feels like a bit of high overhead thrash for the sake of consistency.

-------------

PR Review: https://git.openjdk.org/jdk/pull/22659#pullrequestreview-2492802812


More information about the core-libs-dev mailing list