On Thu, 14 Nov 2024 23:38:57 GMT, Phil Race <p...@openjdk.org> wrote:

>> Even more to the point: this won't work the way it used to: the former call 
>> to `doPrivileged` returned a String (the value of `GetPropertyAction::run`). 
>> The new code will use the `GetPropertyAction` instance itself without 
>> executing the run method, so you will be comparing a string `"true"` to the 
>> new `GetPropertyAction` instance, which will always be false since they 
>> aren't of the same type, regardless of what you set the property to. We had 
>> a similar issue with one of our JavaFX PRs that was only discovered by 
>> testing.
>
> Yes, this is not "RUNNING" the action so it isn't right.
> And we should change it to a simple System.getProperty as Kevin points out.

yes, this was missed..updated..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843139898

Reply via email to