RFR: 8345073: Remove SecurityManager checks from sun.awt.image classes
Alexander Zvegintsev
azvegint at openjdk.org
Wed Nov 27 15:01:43 UTC 2024
On Tue, 26 Nov 2024 20:10:10 GMT, Phil Race <prr at openjdk.org> wrote:
> Remove SecurityManager related code from sun.awt.image classes
src/java.desktop/share/classes/sun/awt/image/ImageConsumerQueue.java line 76:
> 74: if (ir.image.source != src) {
> 75: throw new SecurityException("ImageRep added to wrong image source");
> 76: }
This exception also doesn't look directly related to the SM, so we may want to keep it, as you did in `URLImageSource#getDecoder`.
Removing it changed the behavior, now we can instantiate `ImageConsumerQueue` with a mismatched `ImageRepresentation` image source and `InputStreamImageSource`, but we couldn't before.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22398#discussion_r1860812431
More information about the client-libs-dev
mailing list