<Swing Dev> RfR, JDK-8145228 , Java Access Bridge, getAccessibleStatesStringFromContext doesn't wrap the call to getAccessibleRole

Andrej Golovnin andrej.golovnin at gmail.com
Fri Mar 18 10:30:15 UTC 2016


Hi Pete,

>> http://cr.openjdk.java.net/~ptbrunet/JDK-8145228/webrev.01/

please consider using method reference instead of a lambda in:

1411                     AccessibleRole role =
InvocationUtils.invokeAndWait(() -> {
1412                             return ac.getAccessibleRole();
1413                         }, ac);

You can rewrite it as:

1411                     AccessibleRole role =
InvocationUtils.invokeAndWait(ac::getAccessibleRole, ac);

In the first case the Java compiler would generate a syntactic method
and in the second case not.

Best regards,
Andrej Golovnin



More information about the swing-dev mailing list