On Tue, 31 May 2022 09:40:17 GMT, Tejesh R <d...@openjdk.java.net> wrote:
>>> _Actually if the current test executes then its a pass right......?_ This >>> means, if there is no NPE raised then its a pass case right.......? Yeah to >>> some extent it is automatic, I actually didn't get how to handle the caught >>> NPE, so just left it so that the Test case will be failed by NPE. > > Ok, then will try with the _bufferedImage paint_ logic, If I'm able to get > the exception without it been handled by internal code then it'll be really > helpful to make it automatic. > > _Actually if the current test executes then its a pass right......?_ > This means, if there is no NPE raised then its a pass case right.......? Yes, no NPE means the test passes successfully. If NPE is thrown, the test fails. > Yeah to some extent it is automatic, I actually didn't get how to handle the > caught NPE, so just left it so that the Test case will be failed by NPE. In the majority of cases, you don't want to catch exceptions in tests. No exceptions are usually expected. An exception thrown from main makes the test fail. Yet I can't see how it gets thrown from main in this particular case. It's not important, however. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830