RFR: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module [v3]

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Nov 15 03:29:14 UTC 2024


On Thu, 14 Nov 2024 23:38:57 GMT, Phil Race <prr at 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


More information about the client-libs-dev mailing list