On Thu, 10 Nov 2022 16:30:12 GMT, Andy Goryachev <[email protected]> wrote:
>> It seems there was a typo inside function `installListeners(Component, int)`
>> and `removeListeners(Component)` on case EventID.CELLEDITOR.
>>
>> Changed the string from "getCellEditorMethod" to "getCellEditor" in
>> `protected void installListeners(Component c, int eventID)` and `protected
>> void removeListeners(Component c)` methods.
>>
>> Didn't add any test case.
>
> src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java
> line 990:
>
>> 988: try {
>> 989: getCellEditorMethod = c.getClass().getMethod(
>> 990: "getCellEditor", nullClass);
>
> 1. why would they use reflection in the first place?
> 2. wouldn't these code paths be covered by (failing) accessibility unit tests?
I am not sure about your first point.
But for second point I think it is mentioned in
[JDK-8296222](https://bugs.openjdk.org/browse/JDK-8296222) that "-> It looks
like it was never tested "
-------------
PR: https://git.openjdk.org/jdk/pull/11082