Implemented ExtendedOpenSslSession.getStatusResponses() so it not throws an UnsupportedOperationException. (#8290)

Motivation:

6ed7c6c75d added support for ExtendedOpenSslSession but we did not override getStatusResponses(). This lead to test failures on java9.

Modifications:

Implement ExtendedOpenSslSession.getStatusResponses() so it just returns an empty list.

Result:

Test pass again on Java9.
This commit is contained in:
Norman Maurer 2018-09-14 20:33:09 +02:00 committed by GitHub
parent 2b1514ec5a
commit 34d52fcbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ import javax.net.ssl.SSLSessionContext;
import javax.security.cert.X509Certificate;
import java.security.Principal;
import java.security.cert.Certificate;
import java.util.Collections;
import java.util.List;
/**
@ -51,6 +52,13 @@ abstract class ExtendedOpenSslSession extends ExtendedSSLSession implements Open
@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract List getRequestedServerNames();
// Do not mark as override so we can compile on java8.
public List<byte[]> getStatusResponses() {
// Just return an empty list for now until we support it as otherwise we will fail in java9
// because of their sun.security.ssl.X509TrustManagerImpl class.
return Collections.emptyList();
}
@Override
public void handshakeFinished() throws SSLException {
wrapped.handshakeFinished();