RFR: 8342454: Remove calls to doPrivileged in javafx.graphics/com.sun.glass [v2]

Jayathirth D V jdv at openjdk.org
Wed Nov 6 05:13:48 UTC 2024


On Tue, 5 Nov 2024 14:39:03 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/glass/ui/Accessible.java line 169:
>> 
>>> 167:             getAttribute.attribute = attribute;
>>> 168:             getAttribute.parameters = parameters;
>>> 169:             return getAttribute;
>> 
>> This needs to be `getAttribute.get()` to be equivalent to the previous code.
>
> Alternatively, the following would work and be simpler, if you prefer:
> 
> 
>     public Object getAttribute(AccessibleAttribute attribute, Object... parameters) {
>         getAttribute.attribute = attribute;
>         getAttribute.parameters = parameters;
>         return QuantumToolkit.runWithoutRenderLock(getAttribute);
>     }

Thanks for noticing this Kevin. This was root cause for ClassCastException seen when running HelloTextArea with VoiceOver enabled. I have verified that with updated code we don't see any exceptions.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1624#discussion_r1830397551


More information about the openjfx-dev mailing list