tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [tomcat] 06/08: Re-order method lookup so error handling works as intended
Date Tue, 01 Oct 2019 14:49:55 GMT
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 36c5d2ecea0dc3adaeb835f2ff66643126539f68
Author: Mark Thomas <markt@apache.org>
AuthorDate: Tue Oct 1 15:38:54 2019 +0100

    Re-order method lookup so error handling works as intended
---
 java/org/apache/tomcat/util/compat/Jre8Compat.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre8Compat.java b/java/org/apache/tomcat/util/compat/Jre8Compat.java
index 8f0c5fd..867dbd5 100644
--- a/java/org/apache/tomcat/util/compat/Jre8Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre8Compat.java
@@ -49,9 +49,9 @@ class Jre8Compat extends Jre7Compat {
 
             // The class is Java6+...
             Class<?> c2 = Class.forName("javax.net.ssl.SSLParameters");
-            m1 = SSLServerSocket.class.getMethod("getSSLParameters");
             // ...but this method is Java8+
-            m2 = c2.getMethod("setUseCipherSuitesOrder", boolean.class);
+            m1 = c2.getMethod("setUseCipherSuitesOrder", boolean.class);
+            m2 = SSLServerSocket.class.getMethod("getSSLParameters");
             m3 = SSLServerSocket.class.getMethod("setSSLParameters", c2);
         } catch (SecurityException e) {
             // Should never happen
@@ -68,8 +68,8 @@ class Jre8Compat extends Jre7Compat {
             // Must be pre-Java 7
             log.debug(sm.getString("jre8Compat.javaPre7"), e);
         }
-        getSSLParametersMethod = m1;
-        setUseCipherSuitesOrderMethod = m2;
+        setUseCipherSuitesOrderMethod = m1;
+        getSSLParametersMethod = m2;
         setSSLParametersMethod = m3;
     }
 


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


Mime
View raw message