On Tue, 10 Dec 2024 11:16:55 GMT, Eirik Bjørsnøs <eir...@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.

I agree with Roger. The benefit of making this debug property case insensitive 
is so minor.   For boolean property with false as the default, I think a good 
improvement would be to accept empty value (i.e. `-Dfoo`) as it's just a switch 
to turn it on. For example, `-Djdk.net.URLClassPath.disableClassPathURLCheck`,  
`-Djdk.net.URLClassPath.showIgnoredClassPathEntries`.

I'm not suggesting this PR to do it as this debug property is only used during 
debugging and consistency argument does not really stand.

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

PR Comment: https://git.openjdk.org/jdk/pull/22659#issuecomment-2532558476

Reply via email to