title: Is DocumentBuilderFactory thread-safe in Java 5+?
body: <p>The <a href="http://docs.oracle.com/javase/1.4.2/docs/api/javax/xml/parsers/DocumentBuilderFactory.html" rel="noreferrer">Java 1.4 doc</a> for <code>javax.xml.parsers.DocumentBuilderFactory</code> states in no uncertain terms:</p>
  
  <blockquote>
    <p>An implementation of the DocumentBuilderFactory class is NOT guaranteed to be thread safe. It is up to the user application to make sure about the use of the DocumentBuilderFactory from more than one thread. Alternatively the application can have one instance of the DocumentBuilderFactory per thread. An application can use the same instance of the factory to obtain one or more instances of the DocumentBuilder provided the instance of the factory isn't being used in more than one thread at a time.</p>
  </blockquote>
  
  <p>The <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/xml/parsers/DocumentBuilderFactory.html" rel="noreferrer">Java 5</a> and <a href="http://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilderFactory.html" rel="noreferrer">Java 6</a> docs, however, say nothing of the kind. Is <code>DocumentBuilderFactory</code> thread-safe now, or did Sun just decide the warning was overkill and people should know better?</p>