From: Andreas Beeker Date: Sun, 24 Jun 2018 07:30:20 +0000 (+0000) Subject: #59268 - cache typeloader because of OOMs in the jenkins tests X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d046ec2aef8383f68b485f4b483d40beeb70a4f;p=poi.git #59268 - cache typeloader because of OOMs in the jenkins tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1834236 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build.xml b/build.xml index e7e5e5e2e1..e65567b61f 100644 --- a/build.xml +++ b/build.xml @@ -871,10 +871,22 @@ under the License. - + + typeLoader; + + private static synchronized org.apache.xmlbeans.SchemaTypeLoader getTypeLoader() { + org.apache.xmlbeans.SchemaTypeLoader stl = (typeLoader == null) ? null : typeLoader.get(); + if (stl == null) { + stl = org.apache.xmlbeans.XmlBeans.typeLoaderForClassLoader(\2.class.getClassLoader()); + typeLoader = new java.lang.ref.SoftReference(stl); + } + return stl; + } + + public static \2 newInstance\(\) \{]]> + +