[java-opensaml] 02/02: IDP-1397: Removal of deprecated features

Brent Putman putmanb at georgetown.edu
Tue Feb 18 20:14:45 EST 2020


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=929676abc8885975b7cf0b38ee64b8cbe6f65d0e

commit 929676abc8885975b7cf0b38ee64b8cbe6f65d0e
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Tue Feb 18 20:00:37 2020 -0500

    IDP-1397: Removal of deprecated features
    
    In these cases we're implementing a deprecated interface from another
    API.  To both suppress the deprecation warnings and also to
    warn ourselves if we accidentally use them, mark our impls @Deprecated.
    Add @Override so we'll brute-force know when the third-party API
    removes the deprecated method.
---
 .../security/httpclient/impl/MockSSLSession.java   | 25 ++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/opensaml-security-impl/src/test/java/org/opensaml/security/httpclient/impl/MockSSLSession.java b/opensaml-security-impl/src/test/java/org/opensaml/security/httpclient/impl/MockSSLSession.java
index 4397cc9..14f5fee 100644
--- a/opensaml-security-impl/src/test/java/org/opensaml/security/httpclient/impl/MockSSLSession.java
+++ b/opensaml-security-impl/src/test/java/org/opensaml/security/httpclient/impl/MockSSLSession.java
@@ -24,7 +24,6 @@ import java.util.List;
 import javax.net.ssl.SSLPeerUnverifiedException;
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSessionContext;
-import javax.security.cert.X509Certificate;
 
 /**
  *  Mock impl of {@link SSLSession} used in testing hostname verifiers and SSL socket factories.
@@ -39,10 +38,12 @@ public class MockSSLSession implements SSLSession {
         this.peerHost = host;
     }
     
+    @Override
     public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException {
         return peerCertificates.toArray(new Certificate[0]);
     }
 
+    @Override
     public String getPeerHost() {
         return peerHost;
     }
@@ -51,76 +52,96 @@ public class MockSSLSession implements SSLSession {
     
     // Methods below here are just unimplemented stubs    
 
+    @Override
     public int getApplicationBufferSize() {
         return 0;
     }
 
+    @Override
     public String getCipherSuite() {
         return null;
     }
 
+    @Override
     public long getCreationTime() {
         return 0;
     }
 
+    @Override
     public byte[] getId() {
         return null;
     }
 
+    @Override
     public long getLastAccessedTime() {
         return 0;
     }
 
+    @Override
     public Certificate[] getLocalCertificates() {
         return null;
     }
 
+    @Override
     public Principal getLocalPrincipal() {
         return null;
     }
 
+    @Override
     public int getPacketBufferSize() {
         return 0;
     }
 
-    public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException {
+    @Deprecated
+    @Override
+    public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException {
         return null;
     }
 
+    @Override
     public int getPeerPort() {
         return 0;
     }
 
+    @Override
     public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
         return null;
     }
 
+    @Override
     public String getProtocol() {
         return null;
     }
 
+    @Override
     public SSLSessionContext getSessionContext() {
         return null;
     }
 
+    @Override
     public Object getValue(String name) {
         return null;
     }
 
+    @Override
     public String[] getValueNames() {
         return null;
     }
 
+    @Override
     public void invalidate() {
     }
 
+    @Override
     public boolean isValid() {
         return false;
     }
 
+    @Override
     public void putValue(String name, Object value) {
     }
 
+    @Override
     public void removeValue(String name) {
     }
     

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list