RFR: JDK-6725221 Standardize obtaining boolean properties with defaults
    Mark Powers 
    duke at openjdk.java.net
       
    Tue May 10 19:27:50 UTC 2022
    
    
  
On Fri, 6 May 2022 17:56:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> JDK-6725221 Standardize obtaining boolean properties with defaults
>
> src/java.base/share/classes/java/lang/reflect/AccessibleObject.java line 777:
> 
>> 775:         if (!printStackPropertiesSet && VM.initLevel() >= 1) {
>> 776:             printStackWhenAccessFails = GetBooleanAction.
>> 777:                 privilegedGetProperty("sun.reflect.debugModuleAccessChecks");
> 
> Running with `-Dsun.reflect.debugModuleAccessChecks` should set printStackWhenAccessFails to true, not false.
You are right. The old way maps the null string to true, and the new way maps it to false. I did not notice that. At this point, I see no value in making the "true".equals and "false".equals changes. Too much can break. I'll reverse these changes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8559
    
    
More information about the net-dev
mailing list