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
parent 6ae8cd6e44
commit 56d2635733

View File

@ -473,6 +473,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: