Author: violetagg Date: Wed Mar 29 13:57:55 2017 New Revision: 1789367 URL: http://svn.apache.org/viewvc?rev=1789367&view=rev Log: Fix Java8 detection by testing for class java.util.Optional (Java8+) instead of class javax.net.ssl.SSLParameters (Java6+). Patch provided by fibbers via Github.
This closes apache/tomcat70#12 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1789367&r1=1789366&r2=1789367&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Wed Mar 29 13:57:55 2017 @@ -78,7 +78,7 @@ public class JreMemoryLeakPreventionList boolean isJava8OrLater; try { - Class.forName("javax.net.ssl.SSLParameters"); + Class.forName("java.util.Optional"); isJava8OrLater = true; } catch (ClassNotFoundException e) { isJava8OrLater = false; Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1789367&r1=1789366&r2=1789367&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Mar 29 13:57:55 2017 @@ -58,6 +58,14 @@ issues do not "pop up" wrt. others). --> <section name="Tomcat 7.0.78 (violetagg)"> + <subsection name="Catalina"> + <changelog> + <fix> + Fix Java8 detection in <code>JreMemoryLeakPreventionListener</code> + Patch provided by fibbers via Github. (violetagg) + </fix> + </changelog> + </subsection> <subsection name="Other"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org