RFR: JDK-8344303 : Remove usage of URLUtil.getConnectPermission from sun.awt.SunToolkit and sun.awt.image.URLImageSource [v2]

Phil Race prr at openjdk.org
Fri Nov 22 19:53:17 UTC 2024


On Fri, 22 Nov 2024 19:44:28 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> src/java.desktop/share/classes/sun/awt/image/URLImageSource.java line 48:
>> 
>>> 46:             try {
>>> 47:                 java.security.Permission perm =
>>> 48:                       URLUtil.getConnectPermission(u);
>> 
>> `URLUtil.getConnectPermission(u);` is no longer used anywhere and can be removed
>> 
>> 
>> https://github.com/openjdk/jdk/commit/8c644ca310c44995a1fc899eabb5611b79873c68#diff-50e0953b57d7ba2dbb8faa9b1766b99234d5ae4cb271c48ece13b9e3d0c9ca89
>> 
>> so the jdk/src/java.base/share/classes/sun/net/util/URLUtil.java part can be reverted
>
> Will changes **sun/net/util/URLUtil.java** be handled in [JDK-8344180](https://bugs.openjdk.org/browse/JDK-8344180)? Or do we do it here?

> so the jdk/src/java.base/share/classes/sun/net/util/URLUtil.java part can be reverted

true

> will changes to java.base files - URLUtil.java be handled in [JDK-8344180](https://bugs.openjdk.org/browse/JDK-8344180)? Or do we do it here?

If really no other code is using, it then yes, you could do it here but you should ask @dfuch about that since I don't know what is in his mind .. 

In the bug report he just wrote "This will allow to remove the method from sun.net.util.URLUtil."

Which could be interpreted either way.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22330#discussion_r1854566312


More information about the client-libs-dev mailing list