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 2016/05/16 14:57:43 UTC
svn commit: r1744064 -
/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
Author: markt
Date: Mon May 16 14:57:43 2016
New Revision: 1744064
URL: http://svn.apache.org/viewvc?rev=1744064&view=rev
Log:
Update comments to reflect that one of the issues does not affect Java 8 (the minimum version required for Tomcat 9)
Modified:
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1744064&r1=1744063&r2=1744064&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Mon May 16 14:57:43 2016
@@ -286,33 +286,25 @@ public class JreMemoryLeakPreventionList
}
}
- /*
- * Various leaks related to the use of XML parsing.
- */
if (xmlParsingProtection) {
- // There are three known issues with XML parsing
- // 1. DocumentBuilderFactory.newInstance().newDocumentBuilder();
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6916498
- // This issue is fixed in Java 7 onwards
+ // There are two known issues with XML parsing that affect
+ // Java 8+. The issues both relate to cached Exception
+ // instances that retain a link to the TCCL via the
+ // backtrace field. Note that YourKit only shows this field
+ // when using the HPROF format memory snapshots.
+ // https://bz.apache.org/bugzilla/show_bug.cgi?id=58486
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
-
- // The 2nd and 3rd links both relate to cached Exception
- // instances that retain a link to the TCCL via the
- // backtrace field. Note that YourKit only shows this
- // field when using the HPROF format memory snapshots.
- // https://bz.apache.org/bugzilla/show_bug.cgi?id=58486
- // These issues are currently present in all current
- // versions of Java
-
- // 2. com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl
+ // Issue 1
+ // com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl
Document document = documentBuilder.newDocument();
document.createElement("dummy");
DOMImplementationLS implementation =
(DOMImplementationLS)document.getImplementation();
implementation.createLSSerializer().writeToString(document);
- // 3. com.sun.org.apache.xerces.internal.dom.DOMNormalizer
+ // Issue 1
+ // com.sun.org.apache.xerces.internal.dom.DOMNormalizer
document.normalize();
} catch (ParserConfigurationException e) {
log.error(sm.getString("jreLeakListener.xmlParseFail"),
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org