Hello Eirik,

Like Claes noted, this is an internal class and the use of either of @Deprecated annotation or the @deprecated javadoc taglet is unncessary. Furthermore, like you note, it looks like this method is not used anywhere within the repo (not even in tests). So I think we can remove it. This method was the only way to set the private "defaultAuth" field (to a non-null value). This then means that the "defaultAuth" is currently not set by any code and while we are removing that setDefaultAuthenticator method, we should also remove this field and references to this field within the same internal class. This field and its usage have already been marked with a code comment which says that it should be removed in JDK2.0.

-Jaikiran

On 11/03/24 2:14 am, Eirik Bjørsnøs wrote:
Hi,

While investigating methods annotated as @Deprecated, but with missing @deprecated javadoc tags, I discovered that sun.net.w.p.h.HttpURLConnection.setDefaultAuthenticator has a trailing period after its @deprecated tag, causing javac to not recognize it as such.

Some observations:

o The method has had this invalid @deprecated note since the initial load
o It was marked @Deprecated in Java 8
o It seems to be unused across the OpenJDK code base, including tests
o The class seems internal, given that its package is exported only to java.security.jgss

What is the right step forward here?

0: Do nothing, nobody complained so far
1: Fix the @deprecated tag issue
2: Mark the @Deprecated forRemoval=true
3: Remove the method and the private static field now
4: Something else

Thanks,
Eirik.

Reply via email to