Override ALPN methods on ReferenceCountedOpenSslEngine (#10954)

Motivation:

We should override the get*ApplicationProtocol() methods in ReferenceCountedOpenSslEngine to make it easier for users to obtain the selected application protocol

Modifications:

Add missing overrides

Result:

Easier for the user to get the selected application protocol (if any)
This commit is contained in:
Norman Maurer 2021-01-21 10:55:16 +01:00 committed by GitHub
parent ae3eebf11b
commit 42ba433576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -482,6 +482,18 @@ public class ReferenceCountedOpenSslEngine extends SSLEngine implements Referenc
return refCnt.release(decrement);
}
// These method will override the method defined by Java 8u251 and later. As we may compile with an earlier
// java8 version we don't use @Override annotations here.
public String getApplicationProtocol() {
return applicationProtocol;
}
// These method will override the method defined by Java 8u251 and later. As we may compile with an earlier
// java8 version we don't use @Override annotations here.
public String getHandshakeApplicationProtocol() {
return applicationProtocol;
}
@Override
public final synchronized SSLSession getHandshakeSession() {
// Javadocs state return value should be: