Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 11/04/2011 02:53 PM, Caolán McNamara wrote:
On Fri, 2011-11-04 at 14:01 +0100, Stephan Bergmann wrote:
That is, the call to DocumentBuilderFactory.newInstance() within
OfficeDocumentReportTarget would need to be wrapped

Erm...

http://opengrok.libreoffice.org/search?q=DocumentBuilderFactory.newInstance&project=core&defs=&refs=&path=&hist=

Looks we're fairly riddled with this pattern. So presumably if this
problem affects DocumentBuilderFactory.newInstance we already suffer
from it in our xsltfilter and other places ?

The pattern probably here is that the problem is not noticed as long as the Java code is called from the main thread. (The empty context class loader problem arises only for native threads other than the initial JVM thread that are attached to the JVM via JNI. Threads spawned by the JVM inherit the calling thread's context class loader, and the thread on which the JVM is originally initialized explicitly obtains a non-null context class loader during initialization, IIRC).

Anyway, you have been warned.  ;)

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.