RFR: 8353642: Deprecate networking permission classes for removal [v2]

Daniel Jeliński djelinski at openjdk.org
Fri Apr 11 11:00:26 UTC 2025


On Fri, 11 Apr 2025 10:01:26 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Please find her a patch that deprecate networking permission classes for removal. The method `URL::getPermission` now serves little  purpose and is also deprecated. That method was overridden in subclasses and specified to return some of the deprecated permissions.
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Missing white spaces

src/java.base/share/classes/java/net/HttpURLConnection.java line 617:

> 615:      * {@link java.security.AllPermission}.
> 616:      */
> 617:     @Deprecated(since = "25")

can this (and all other getPermission methods) be "forRemoval=true"?

src/java.base/share/classes/java/security/CodeSource.java line 468:

> 466:                 }
> 467:                 @SuppressWarnings("removal")
> 468:                 var result = this.sp.implies(that.sp);

Will we need to rewrite this code without SocketPermissions? Can we remove it, maybe? It is only used by CodeSource.implies, which is not used by the JDK (but may be used elsewhere).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24592#discussion_r2039291810
PR Review Comment: https://git.openjdk.org/jdk/pull/24592#discussion_r2039304662


More information about the security-dev mailing list