Author: markt
Date: Tue Dec 18 11:03:51 2018
New Revision: 1849161

URL: http://svn.apache.org/viewvc?rev=1849161&view=rev
Log:
Fix failing test for NIO and NIO2 when Java 11 is used

Modified:
    tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

Modified: 
tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1849161&r1=1849160&r2=1849161&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java 
(original)
+++ tomcat/tc8.5.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Tue 
Dec 18 11:03:51 2018
@@ -112,7 +112,7 @@ public final class TesterSupport {
             String keystorePass, String keyPass) {
 
         String protocol = tomcat.getConnector().getProtocolHandlerClassName();
-        if (protocol.indexOf("Apr") == -1) {
+        if (!protocol.contains("Apr")) {
             Connector connector = tomcat.getConnector();
             String sslImplementation = 
System.getProperty("tomcat.test.sslImplementation");
             if (sslImplementation != null && 
!"${test.sslImplementation}".equals(sslImplementation)) {
@@ -180,7 +180,7 @@ public final class TesterSupport {
 
     protected static void configureClientSsl() {
         try {
-            SSLContext sc = 
SSLContext.getInstance(Constants.SSL_PROTO_TLSv1_2);
+            SSLContext sc = SSLContext.getInstance(Constants.SSL_PROTO_TLS);
             sc.init(TesterSupport.getUser1KeyManagers(),
                     TesterSupport.getTrustManagers(),
                     null);
@@ -268,7 +268,7 @@ public final class TesterSupport {
             X509Certificate cert = 
(X509Certificate)ks.getCertificate(CA_ALIAS);
             clientAuthExpectedIssuer = cert.getSubjectDN().getName();
         } catch (Exception ex) {
-            // Ignore
+            throw new RuntimeException(ex);
         }
 
         String cn = "NOTFOUND";
@@ -277,7 +277,7 @@ public final class TesterSupport {
             X509Certificate cert = 
(X509Certificate)ks.getCertificate(CLIENT_ALIAS);
             cn = cert.getSubjectDN().getName();
         } catch (Exception ex) {
-            // Ignore
+            throw new RuntimeException(ex);
         }
 
         realm.addUser(cn, "not used");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to