Still trying to diagnose random failures in ProjectGenerator.
1.1 --- a/openide.util/src/org/openide/xml/XMLUtil.java Thu Jul 16 17:26:11 2009 -0400
1.2 +++ b/openide.util/src/org/openide/xml/XMLUtil.java Wed Jul 22 18:59:31 2009 -0400
1.3 @@ -214,7 +214,7 @@
1.4 *
1.5 * @return XMLReader configured according to passed parameters
1.6 */
1.7 - public static XMLReader createXMLReader(boolean validate, boolean namespaceAware)
1.8 + public static synchronized XMLReader createXMLReader(boolean validate, boolean namespaceAware)
1.9 throws SAXException {
1.10 SAXParserFactory factory = saxes[validate ? 0 : 1][namespaceAware ? 0 : 1];
1.11 if (factory == null) {
1.12 @@ -296,7 +296,7 @@
1.13 }
1.14
1.15 private static DocumentBuilderFactory[][] doms = new DocumentBuilderFactory[2][2];
1.16 - private static DocumentBuilderFactory getFactory(boolean validate, boolean namespaceAware) {
1.17 + private static synchronized DocumentBuilderFactory getFactory(boolean validate, boolean namespaceAware) {
1.18 DocumentBuilderFactory factory = doms[validate ? 0 : 1][namespaceAware ? 0 : 1];
1.19 if (factory == null) {
1.20 factory = DocumentBuilderFactory.newInstance();