Automated merge with http://hg.netbeans.org/core-main/
authorJesse Glick <jglick@netbeans.org>
Wed, 22 Jul 2009 19:03:18 -0400
changeset 804cf666487ce56
parent 802 9c19ea87f6cd
parent 803 433f20b6052a
child 805 a8a3ba796802
child 927 3b3062799853
Automated merge with http://hg.netbeans.org/core-main/
     1.1 --- a/openide.util/src/org/openide/xml/XMLUtil.java	Wed Jul 22 15:06:37 2009 +0200
     1.2 +++ b/openide.util/src/org/openide/xml/XMLUtil.java	Wed Jul 22 19:03:18 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();