This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 3a06248 Remove use of JreCompat as it is not required with Java 11+
3a06248 is described below
commit 3a062482563222cb86742bf844f5c2fa7ed9fe2d
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 28 13:16:59 2021 +0100
Remove use of JreCompat as it is not required with Java 11+
---
java/org/apache/tomcat/util/net/SecureNio2Channel.java | 6 ++----
java/org/apache/tomcat/util/net/SecureNioChannel.java | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/SecureNio2Channel.java
b/java/org/apache/tomcat/util/net/SecureNio2Channel.java
index f460304..56a9ebf 100644
--- a/java/org/apache/tomcat/util/net/SecureNio2Channel.java
+++ b/java/org/apache/tomcat/util/net/SecureNio2Channel.java
@@ -41,7 +41,6 @@ import javax.net.ssl.SSLSession;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteBufferUtils;
-import org.apache.tomcat.util.compat.JreCompat;
import org.apache.tomcat.util.net.TLSClientHelloExtractor.ExtractorResult;
import org.apache.tomcat.util.net.openssl.ciphers.Cipher;
import org.apache.tomcat.util.res.StringManager;
@@ -250,9 +249,8 @@ public class SecureNio2Channel extends Nio2Channel {
if (sslEngine instanceof SSLUtil.ProtocolInfo) {
socketWrapper.setNegotiatedProtocol(
((SSLUtil.ProtocolInfo)
sslEngine).getNegotiatedProtocol());
- } else if (JreCompat.isAlpnSupported()) {
- socketWrapper.setNegotiatedProtocol(
-
JreCompat.getInstance().getApplicationProtocol(sslEngine));
+ } else {
+
socketWrapper.setNegotiatedProtocol(sslEngine.getApplicationProtocol());
}
}
//we are complete if we have delivered the last package
diff --git a/java/org/apache/tomcat/util/net/SecureNioChannel.java
b/java/org/apache/tomcat/util/net/SecureNioChannel.java
index 22e339f..e3fc746 100644
--- a/java/org/apache/tomcat/util/net/SecureNioChannel.java
+++ b/java/org/apache/tomcat/util/net/SecureNioChannel.java
@@ -38,7 +38,6 @@ import javax.net.ssl.SSLSession;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteBufferUtils;
-import org.apache.tomcat.util.compat.JreCompat;
import org.apache.tomcat.util.net.NioEndpoint.NioSocketWrapper;
import org.apache.tomcat.util.net.TLSClientHelloExtractor.ExtractorResult;
import org.apache.tomcat.util.net.openssl.ciphers.Cipher;
@@ -175,9 +174,8 @@ public class SecureNioChannel extends NioChannel {
if (sslEngine instanceof SSLUtil.ProtocolInfo) {
socketWrapper.setNegotiatedProtocol(
((SSLUtil.ProtocolInfo)
sslEngine).getNegotiatedProtocol());
- } else if (JreCompat.isAlpnSupported()) {
- socketWrapper.setNegotiatedProtocol(
-
JreCompat.getInstance().getApplicationProtocol(sslEngine));
+ } else {
+
socketWrapper.setNegotiatedProtocol(sslEngine.getApplicationProtocol());
}
}
//we are complete if we have delivered the last package
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]