On Fri, 9 May 2025 19:19:03 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> src/java.base/share/classes/java/net/HttpURLConnection.java line 615:
>> 
>>> 613:      */
>>> 614:     @Deprecated(since = "25", forRemoval = true)
>>> 615:     @SuppressWarnings("removal")
>> 
>> Do you still need this annotation now that `SocketPermission` is not 
>> deprecated for removal?
>
> Ah - good point - I will double check.

Yes - it is needed as well. Apparently if you override a deprecated method you 
need both `@Deprecated` and `@SuppressWarning`:


src/java.base/share/classes/java/net/HttpURLConnection.java:615: warning: 
[removal] getPermission() in URLConnection has been deprecated and marked for 
removal
    public Permission getPermission() throws IOException {
                      ^
error: warnings found and -Werror specified

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

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

Reply via email to