RFR: 4200096: OffScreenImageSource.removeConsumer NullPointerException [v3]

Jeremy duke at openjdk.org
Wed Apr 12 04:02:38 UTC 2023


On Tue, 11 Apr 2023 00:10:53 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   4200096: rewrite solution, add LegitimateNullPointerTest
>>   
>>   Also I'm breaking out the unit tests (now there are 4 of them) into their own directory.
>>   
>>   The new LegitimateNullPointerTest confirms that we DO want to see NullPointerExceptions printed to System.err IF they come from the ImageConsumer itself.
>>   
>>   In this ticket most of our focus has been on the NPE's that stem from removing an ImageConsumer from OSIS mid-production (so the NPE was when OSIS tried to interact with its `theConsumer` field). This test tries to add other possible NPE's to our consideration.
>>   
>>   This new test passed in the master branch before this branch. I want to preserve this existing behavior if this proposal is accepted.
>
> test/jdk/sun/awt/image/OffScreenImageSource/bug4200096.java line 49:
> 
>> 47:                 super.println(x);
>> 48:                 if (x instanceof Throwable)
>> 49:                     System.exit(1);
> 
> The tests should not use the System.exit() as it might affect the execution of other tests. It is better to set some flag and check it at the end.

Thanks; this is fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13408#discussion_r1163569506



More information about the client-libs-dev mailing list