<AWT Dev> RFR: 8272806: [macOS] "Apple AWT Internal Exception" when input method is changed

Phil Race prr at openjdk.java.net
Sun Aug 22 19:53:39 UTC 2021


There's a long eval in the bug report : https://bugs.openjdk.java.net/browse/JDK-8272806 but here's the summary

When focus is lost by the app a message is sent down to native setting a native reference to the input method to null
which is a sort of signal not to notify upwards anything to the input method (which internally will NPE if there's
no focused component as is the case after focus is lost).
But we aren't actually setting it to null because of a check for null which previously checked the wrapper for
the JNI ref was not null but is now obsolete.  So just remove the check for null.

The steps to reproduce this bug are very manual and involve installing additional input methods and toggling them
at the system level. So I didn't see a way to write a useful regression test but if you follow the bug report steps you
should be able to verify the fix.

I've run all automated tests just for good measure and they all pass.

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

Commit messages:
 - 8272806: [macOS] "Apple AWT Internal Exception" when input method is changed

Changes: https://git.openjdk.java.net/jdk/pull/5211/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5211&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8272806
  Stats: 4 lines in 2 files changed: 1 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5211.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5211/head:pull/5211

PR: https://git.openjdk.java.net/jdk/pull/5211


More information about the awt-dev mailing list