On Tue, 29 Mar 2022 17:39:25 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line >> 472: >> >>> 470: return invokeAndWait(new Callable<Accessible>() { >>> 471: public Accessible call() throws Exception { >>> 472: if (parent == null || !parent.isVisible()) { >> >> Should the `isShowing` be used here to check containers up to the top level? >> But I think it should be possible to create a test that may trigger an >> exception in `getLocationOnScreen()` after the check, so maybe try/catch >> will be a better approach. > > Well, if the parent is visible then it is all we need to get its screen > coordinates. But i also think that surrounding the entire call in try/catch > block would work better. Updating the fix. Why do you need to wrap the entire call, can this exception be thrown by some other methods? ------------- PR: https://git.openjdk.java.net/jdk/pull/8008