Author: dkulp
Date: Sun Sep 6 02:41:03 2009
New Revision: 811750
URL: http://svn.apache.org/viewvc?rev=811750&view=rev
Log:
Use the DOMUtils.createDocument call to create the document to avoid
having to create builders and such upfront when we don't really need to.
Modified:
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Modified:
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java?rev=811750&r1=811749&r2=811750&view=diff
==============================================================================
---
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
(original)
+++
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Sun Sep 6 02:41:03 2009
@@ -26,7 +26,6 @@
import java.util.ListIterator;
import javax.wsdl.extensions.UnknownExtensibilityElement;
-import javax.xml.parsers.DocumentBuilder;
import javax.xml.stream.XMLStreamException;
import org.w3c.dom.Attr;
@@ -62,8 +61,6 @@
public class PolicyAnnotationListener implements FactoryBeanListener {
private static final String EXTRA_POLICIES =
PolicyAnnotationListener.class.getName() + ".EXTRA_POLICIES";
- private static final DocumentBuilder DEFAULT_DOC_BUILDER =
DOMUtils.createDocumentBuilder();
-
public void handleEvent(Event ev, AbstractServiceFactoryBean factory,
Object... args) {
switch (ev) {
case INTERFACE_CREATED: {
@@ -358,7 +355,7 @@
}
}
}
- Document doc = DEFAULT_DOC_BUILDER.newDocument();
+ Document doc = DOMUtils.createDocument();
Element el = doc.createElementNS(ns,
"wsp:" +
PolicyConstants.POLICYREFERENCE_ELEM_NAME);
Attr att = doc.createAttribute("URI");