You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/10/02 20:02:25 UTC
svn commit: r1810589 [2/2] - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/catalina/core/ java/org/apache/tomcat/util/compat/
webapps/docs/
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/compat/JreCompat.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/compat/JreCompat.java?rev=1810589&r1=1810588&r2=1810589&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/compat/JreCompat.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/compat/JreCompat.java Mon Oct 2 20:02:25 2017
@@ -16,6 +16,9 @@
*/
package org.apache.tomcat.util.compat;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
import java.util.Locale;
import javax.net.ssl.SSLEngine;
@@ -36,8 +39,8 @@ public class JreCompat {
private static final boolean jre9Available;
private static final boolean jre8Available;
private static final boolean jre7Available;
-
-
+
+
static {
// This is Tomcat 7 with a minimum Java version of Java 6. The latest
// Java version the optional features require is Java 9.
@@ -65,20 +68,20 @@ public class JreCompat {
jre7Available = false;
}
}
-
-
+
+
public static JreCompat getInstance() {
return instance;
}
-
-
+
+
// Java 6 implementation of Java 7 methods
-
+
public static boolean isJre7Available() {
return jre7Available;
}
-
-
+
+
public Locale forLanguageTag(String languageTag) {
// Extract the language and country for this entry
String language = null;
@@ -107,8 +110,8 @@ public class JreCompat {
return new Locale(language, country, variant);
}
-
-
+
+
private static final boolean isAlpha(String value) {
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
@@ -118,22 +121,22 @@ public class JreCompat {
}
return true;
}
-
-
+
+
// Java 6 implementation of Java 8 methods
-
+
public static boolean isJre8Available() {
return jre8Available;
}
-
-
+
+
@SuppressWarnings("unused")
public void setUseServerCipherSuitesOrder(SSLServerSocket socket,
boolean useCipherSuitesOrder) {
throw new UnsupportedOperationException(sm.getString("jreCompat.noServerCipherSuiteOrder"));
}
-
-
+
+
@SuppressWarnings("unused")
public void setUseServerCipherSuitesOrder(SSLEngine engine,
boolean useCipherSuitesOrder) {
@@ -161,4 +164,19 @@ public class JreCompat {
// Exception does not exist prior to Java 9
return false;
}
+
+
+ /**
+ * Disables caching for JAR URL connections. For Java 8 and earlier, this also disables
+ * caching for ALL URL connections.
+ *
+ * @throws IOException If a dummy JAR URLConnection can not be created
+ */
+ public void disableCachingForJarUrlConnections() throws IOException {
+ // Doesn't matter that this JAR doesn't exist - just as
+ // long as the URL is well-formed
+ URL url = new URL("jar:file://dummy.jar!/");
+ URLConnection uConn = url.openConnection();
+ uConn.setDefaultUseCaches(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=1810589&r1=1810588&r2=1810589&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Oct 2 20:02:25 2017
@@ -58,6 +58,17 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 7.0.83 (violetagg)">
+ <subsection name="Catalina">
+ <changelog>
+ <add>
+ When running under Java 9 or later, and the
+ <code>urlCacheProtection</code> option of the
+ <code>JreMemoryLeakPreventionListener</code> is enabled, use the API
+ added in Java 9 to only disable the caching for JAR URL connections.
+ (markt)
+ </add>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<fix>
@@ -100,11 +111,24 @@
<bug>61452</bug>: Fix a copy paste error that caused an
<code>UnsupportedEncodingException</code> when using WebDAV. (markt)
</fix>
+<<<<<<< .working
<fix>
Correct regression in 7.0.80 that broke the use of relative paths with
the <code>extraResourcePaths</code> attribute of a
<code>VirtualDirContext</code>. (markt)
</fix>
+||||||| .merge-left.r1810587
+ <fix>
+ <bug>61437</bug>: Fix a possible <code>AccessControlException</code>
+ accessing the WebSocket examples when running under a
+ <code>SecurityManager</code>. (markt)
+ </fix>
+ <fix>
+ <bug>61452</bug>: Fix a copy paste error that caused an
+ <code>UnsupportedEncodingException</code> when using WebDAV. (markt)
+ </fix>
+=======
+>>>>>>> .merge-right.r1810588
<add>
<bug>61489</bug>: When using the CGI servlet, make the generation of
command line arguments from the query string (as per section 4.4 of RFC
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org