Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-24 Thread Bradford Wetmore
On Tue, 24 May 2022 16:20:10 GMT, Mark Powers  wrote:

> Mach5 tier1 and tier2 completed without any failures. I don't know what to 
> make of the pre-submit failures - lang and hotspot?

IIUC, these are due to Loom failures in some of the other platforms supported 
by OpenJDK but not by Oracle.  They are being resolved.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-24 Thread Mark Powers
On Mon, 23 May 2022 18:58:34 GMT, Mark Powers  wrote:

>> JDK-6725221 Standardize obtaining boolean properties with defaults
>
> Mark Powers has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains six commits:
> 
>  - Alan and Jamil comments
>  - Merge
>  - reverse true.equals and false.equals changes
>  - Merge
>  - Merge
>  - first iteration

Mach5 tier1 and tier2 completed without any failures. I don't know what to make 
of the pre-submit failures - lang and hotspot?

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Roger Riggs
On Mon, 23 May 2022 18:58:34 GMT, Mark Powers  wrote:

>> JDK-6725221 Standardize obtaining boolean properties with defaults
>
> Mark Powers has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains six commits:
> 
>  - Alan and Jamil comments
>  - Merge
>  - reverse true.equals and false.equals changes
>  - Merge
>  - Merge
>  - first iteration

LGTM

-

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
On Mon, 23 May 2022 18:34:41 GMT, Roger Riggs  wrote:

>> 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.
>
> This change still needs to be reversed.

The change has been reversed.

We had an internal discussion about IntelliJ's unboxing recommendation, and 
decided to let unboxing be a matter of personal preference. Those changes have 
been reversed too.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
> JDK-6725221 Standardize obtaining boolean properties with defaults

Mark Powers has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains six commits:

 - Alan and Jamil comments
 - Merge
 - reverse true.equals and false.equals changes
 - Merge
 - Merge
 - first iteration

-

Changes: https://git.openjdk.java.net/jdk/pull/8559/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8559&range=01
  Stats: 9 lines in 3 files changed: 1 ins; 1 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8559.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8559/head:pull/8559

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-23 Thread Roger Riggs
On Tue, 10 May 2022 19:24:24 GMT, Mark Powers  wrote:

>> 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.

This change still needs to be reversed.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-10 Thread Mark Powers
On Fri, 6 May 2022 17:56:44 GMT, Alan Bateman  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


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-07 Thread Alan Bateman
On Sun, 8 May 2022 02:22:08 GMT, Phil Race  wrote:

> I did wonder why it has security-libs as the sub-category and if the intent 
> was not what we see here.

I suspect the JBS issue was initially created to to look at the usages of 
getProperty in the security code but it has been extended. The issue is that it 
changes the meaning of the empty value case in at least two places so each one 
will require careful attention.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-07 Thread Phil Race
On Thu, 5 May 2022 16:49:07 GMT, Mark Powers  wrote:

> JDK-6725221 Standardize obtaining boolean properties with defaults

I did wonder why it has security-libs as the sub-category and if the intent was 
not what we see here.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-06 Thread Bradford Wetmore
On Thu, 5 May 2022 16:49:07 GMT, Mark Powers  wrote:

> JDK-6725221 Standardize obtaining boolean properties with defaults

Sorry for the confusion.

The original intent of this bug 14 years ago was to standardize the seclibs 
code where simple getProperty calls were needed in the context of an 
AccessController, without having to provide the doProvided calls. i.e. 
GetBooleanAction.privilegedGetProperty(). This was not intended not other parts 
of the JDK.

For example: ChannelImpl.java provides a getBooleanProperty() method, which is 
very similar to GetBooleanAction. I noticed other places in the security where 
this was being done.

Some of the classes like Debug have been rewritten (SSLLogger), so the issue 
does not appear to exist there any logger.

The certpath code is working with Security.getProperty(), so that was a red 
herring.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-06 Thread Phil Race
On Thu, 5 May 2022 16:49:07 GMT, Mark Powers  wrote:

> JDK-6725221 Standardize obtaining boolean properties with defaults

The xtoolkit change is fine. I've not looked at anything else
You'll clearly need multiple reviewers for this one.

-

Marked as reviewed by prr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8559


Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-06 Thread Alan Bateman
On Thu, 5 May 2022 16:49:07 GMT, Mark Powers  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.

-

PR: https://git.openjdk.java.net/jdk/pull/8559


RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-06 Thread Mark Powers
JDK-6725221 Standardize obtaining boolean properties with defaults

-

Commit messages:
 - Merge
 - first iteration

Changes: https://git.openjdk.java.net/jdk/pull/8559/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8559&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-6725221
  Stats: 27 lines in 10 files changed: 1 ins; 4 del; 22 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8559.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8559/head:pull/8559

PR: https://git.openjdk.java.net/jdk/pull/8559