On Mon, 30 May 2022 16:01:39 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removal of White space > > test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 2: > >> 1: /* >> 2: * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights >> reserved. > > Why is it 2002, 2022 if it's a new test? > > You're taking the code from > [JDK-6429812](https://bugs.openjdk.java.net/browse/JDK-6429812), it was > created in 2006, so the first year can't be earlier than 2006. > Can't the test be automated? > > Can you paint the table to a BufferredImage and catch the NPE? > > Alternatively, if the above can't be done, you can use > [Thread.setUncaughtExceptionHandler](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Thread.html#setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)) > to set > [UncaughtExceptionHandler](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Thread.UncaughtExceptionHandler.html) > for the EDT and catch NPE. > > If NPE is thrown, the test fails. Yeah, wanted to change to automatic, but wasn't sure about whether its ok for NPE check or not. Actually if the current test executes then its a pass right......? Painting it to bufferedImage and then catching NPE is required........? ------------- PR: https://git.openjdk.java.net/jdk/pull/8830