Instead of adding @SupressWarnings to a method, can we add @Deprecated to it?

If I understand correctly, there should be no warning if a deprecated method 
calls another deprecated method. And by deprecating the caller we will get 
warnings if they are called by more methods and we can evaluate if they can be 
further deprecated or modified. This way we would reveal everything that is 
related with the deprecated APIs. Hopefully they are actually useless inside 
JDK.

--Max

> On Mar 6, 2015, at 12:01, Jason Uh <jason...@oracle.com> wrote:
> 
> Hi Max,
> 
> A couple of these, we probably won't be able to remove in JDK 9. I'm 
> deprecating getPeerCertificateChain() in the javax.net.ssl.SSLSession 
> interface in this change, so the implementation in 
> sun.security.ssl.SSLSessionImpl will have to be suppressed. Also, 
> X509V1CertImpl will probably have to be marked with @SupressWarnings in JDK 9 
> and then hopefully it can be removed altogether in JDK 10 along with 
> javax.security.cert.
> 
> As for some of the other methods causing warnings, I think they can actually 
> be removed, but I'd like to track that change in a different issue. I'm not 
> sure yet, but there might have to be some minor test changes to accommodate 
> the changes, too. I filed an issue to track it:
> https://bugs.openjdk.java.net/browse/JDK-8074531
> 
> For now, here are my changes again with Sean's suggested changes to the 
> package-info.java files.
> http://cr.openjdk.java.net/~juh/8073430/01/
> 
> Thanks,
> Jason

Reply via email to