On Wed, 24 Jan 2024 16:31:21 GMT, Christoph Langer <clan...@openjdk.org> wrote:
> by checking for a pending exception before [calling the isHeadless function] I think that is an acceptable solution for this case. The isHeadless() code has no guaranteed context as to how it got here and there maybe other places where we'd have to patch and clearly the call needs to be made even if there's a pending exception, so I would do that. The broader problem is the reason we get here in this situation in the first place. It is the combination of (1) the debug build having asserts, (2) a "headless" env where calls fail that trigger the asserts We really need to fix (2) so that headless doesn't get here. In the absence of (2) it is likely that testing AWT on debug builds + headless will hit more problems. ------------- PR Comment: https://git.openjdk.org/jdk/pull/17404#issuecomment-1909101855