RFR: 4690476: NegativeArraySizeException from AffineTransformOp with shear

Phil Race prr at openjdk.org
Tue Dec 2 22:14:39 UTC 2025


On Tue, 2 Dec 2025 21:49:50 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> > So some inconsistency but I think it is a user-friendly trade-off.
> 
> But that means the content of the resulting image will be cut without any notification to the application. Is that more useful than throwing an exception?

Yes, I think it is or I wouldn't be proposing it.
Take the evidence of the bug report where the exception is clearly unexpected and difficult to predict and could have bad consequences.
Also an app can supply the dest, which unless they are re-using the exact same destination from a previous call or the results of createCompatibleDestImage.

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

PR Comment: https://git.openjdk.org/jdk/pull/27707#issuecomment-3604176242


More information about the client-libs-dev mailing list