~ubuntu-branches/ubuntu/oneiric/ivy/oneiric

« back to all changes in this revision

Viewing changes to src/java/org/apache/ivy/util/XMLHelper.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2011-02-06 20:56:32 UTC
  • mfrom: (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110206205632-sqhg7bx09z0ywj79
Tags: 2.2.0-1
* New upstream release.
* Update pom.xml to the latest version.
* Add Build-Depends and Suggests on libbcprov-java and libbcpg-java.
* Add mh_clean call in clean target.
* Bump Standards-Version to 3.9.1. No changes were required.
* Add myself to Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
52
52
 
53
53
    private static boolean canUseSchemaValidation = true;
54
 
 
55
 
    private static DocumentBuilder docBuilder;
56
54
    
57
55
    private static SAXParser newSAXParser(URL schema, InputStream schemaStream)
58
56
            throws ParserConfigurationException, SAXException {
206
204
    }
207
205
 
208
206
    public static DocumentBuilder getDocBuilder(EntityResolver entityResolver) {
209
 
        if (docBuilder == null) {
210
 
            try {
211
 
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
212
 
                factory.setValidating(false);
213
 
                docBuilder = factory.newDocumentBuilder();
214
 
                if (entityResolver != null) {
215
 
                    docBuilder.setEntityResolver(entityResolver);
216
 
                }
217
 
            } catch (ParserConfigurationException e) {
218
 
                throw new RuntimeException(e);
219
 
            }        
220
 
        }
221
 
        return docBuilder;
 
207
        try {
 
208
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 
209
            factory.setValidating(false);
 
210
            DocumentBuilder docBuilder = factory.newDocumentBuilder();
 
211
            if (entityResolver != null) {
 
212
                docBuilder.setEntityResolver(entityResolver);
 
213
            }
 
214
            return docBuilder;
 
215
        } catch (ParserConfigurationException e) {
 
216
            throw new RuntimeException(e);
 
217
        }        
222
218
    }
223
219
 
224
220