> This resolves the NPE reported in 8395930, and it enhances the preexisting 
> test for JDK-8381236 to cover this case.
> 
> The failing use case involves an Accessible object where 
> `axObj.getAccessibleContext() == null`. Having a `null` AccessibleContext is 
> an atypical case, but it is explicitly identified/allowed in the contract for 
> `Accessible.getAccessibleContext()`.
> 
> Prior to [8381236 
> changes](https://github.com/openjdk/jdk/pull/30578/changes), calling 
> CAccessible.getCAccessible(ax) would also fail with a NPE. So in this PR I'm 
> proposing preserving that behavior (and documenting it), and moving the null 
> check to 8381236's new `disposeRecursively` method.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Jeremy Wood has updated the pull request incrementally with four additional 
commits since the last revision:

 - 8395930: fixing compiler error from merge
 - Update src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
   
   Co-authored-by: ExE Boss <[email protected]>
 - Update src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
   
   Co-authored-by: ExE Boss <[email protected]>
 - Update src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
   
   Co-authored-by: ExE Boss <[email protected]>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/33657/files
  - new: https://git.openjdk.org/jdk/pull/33657/files/2003fae3..eb344b8d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=33657&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33657&range=00-01

  Stats: 6 lines in 1 file changed: 1 ins; 1 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/33657.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33657/head:pull/33657

PR: https://git.openjdk.org/jdk/pull/33657

Reply via email to