On Thu, 20 Aug 2026 17:17:17 GMT, Andy Goryachev <[email protected]> wrote:
>> I mean in our `writeImage` case, null is never returned, no? Could we >> perhaps split the jpg tests, because I like that we test >> `assertTrue(b.length > 0);` for `png` and `gif` with an opaque pixel. And >> for the jpg test, we then could test, that the `length == 0` perhaps? > > The test StubToolkit is somewhat deficient by design - it also cannot scale > images. > > You are right, checking for non-null byte[] is silly (it comes from the > ByteArrayOutputStream). I've left the test in place to test for lack of > exceptions, basically. We could split the test, but the main point is to test the utility API, not the `StubToolkit`. As long as there are no exceptions we should be fine. (We could also fix the `StubToolkit` similarly to what we did for the `TextLayout`, but I doubt the value of that effort). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2267#discussion_r3823819914
