Author: kiwiwings
Date: Wed Jul 26 22:15:27 2017
New Revision: 1803120

URL: http://svn.apache.org/viewvc?rev=1803120&view=rev
Log:
#61350 - Use unsynchronized xmlbeans

Modified:
    poi/site/src/documentation/content/xdocs/status.xml
    poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1803120&r1=1803119&r2=1803120&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Wed Jul 26 22:15:27 2017
@@ -58,6 +58,7 @@
 
     <release version="3.17-beta2" date="2017-09-??">
       <actions>
+        <action dev="PD" type="fix" fixes-bug="61350" module="OPC">Use 
unsynchronized xmlbeans</action>
         <action dev="PD" type="fix" fixes-bug="61346" module="HEMF">Add more 
sanity checks before allocation of byte arrays in HEMF/HWMF.</action>
         <action dev="PD" type="fix" fixes-bug="61338" module="HWMF">Avoid 
infinite loop with corrupt file.</action>
         <action dev="PD" type="fix" fixes-bug="61295" module="HPSF">Avoid OOM 
in hpsf with corrupt file.</action>

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java?rev=1803120&r1=1803119&r2=1803120&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java Wed Jul 26 
22:15:27 2017
@@ -69,6 +69,9 @@ public class POIXMLTypeLoader {
         // so only user code using XmlObject/XmlToken.Factory.parse
         // directly can bypass the entity check, which is probably unlikely 
(... and not within our responsibility :)) 
         // DEFAULT_XML_OPTIONS.setLoadEntityBytesLimit(4096);
+        
+        // POI is not thread-safe - so we can switch to unsynchronized 
xmlbeans mode - see #61350
+        DEFAULT_XML_OPTIONS.setUnsynchronized();
 
         Map<String, String> map = new HashMap<String, String>();
         map.put("http://schemas.openxmlformats.org/drawingml/2006/main";, "a");



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to