On Mon, 14 Jul 2025 20:04:21 GMT, Sean Mullan <mul...@openjdk.org> wrote:

>> `SocketPermission` should be deprecated for removal as has already been done 
>> for many other `Permission` subclasses. However, `CodeSource.implies()` has 
>> specification dependencies on `SocketPermission` which requires additional 
>> changes to decouple those dependencies. 
>> 
>> This change deprecates `SocketPermission`for removal and removes the 
>> dependency on `SocketPermission` from `CodeSource.implies` by copying the 
>> relevant conditions from `SocketPermission.implies`. Additional test cases 
>> for `CodeSource.implies` were also added to check that the behavior is 
>> consistent.
>> 
>> Note that we may also eventually deprecate `CodeSource.implies` for removal 
>> but that requires more investigation.
>
> Sean Mullan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add @SuppressWarnings("removal") to SocketPermissionCollection.

test/jdk/java/security/CodeSource/Implies.java line 65:

> 63:         thisURL = new URL("http", ia.getHostAddress(), "file");
> 64:         thatURL = new URL("http", ia.getHostName(), "file");
> 65:         // ip address should imply host name with same ip address

The specification speaks about IP addresses, specifically:

> If this object was initialized with a single IP address and one of <i>p</i>'s 
> IP addresses is equal to this object's IP address.

So is this test for implying a IP address against a host name valid?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26300#discussion_r2213240050

Reply via email to