cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [36/51] [partial] cxf git commit: Remove all trailing whitespaces
Date Tue, 14 Feb 2017 09:49:41 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/CachingXmlEventWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/CachingXmlEventWriter.java b/core/src/main/java/org/apache/cxf/staxutils/CachingXmlEventWriter.java
index 6dda7f9..2554e39 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/CachingXmlEventWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/CachingXmlEventWriter.java
@@ -39,17 +39,17 @@ import org.apache.cxf.common.util.StringUtils;
 
 
 /**
- * 
+ *
  */
 public class CachingXmlEventWriter implements XMLStreamWriter {
     protected XMLEventFactory factory;
-    
+
     List<XMLEvent> events = new ArrayList<>(1000);
     Stack<NSContext> contexts = new Stack<NSContext>();
     Stack<QName> elNames = new Stack<QName>();
     QName lastStart;
     NSContext curContext = new NSContext(null);
-    
+
     public CachingXmlEventWriter() {
         factory = XMLEventFactory.newInstance();
     }
@@ -57,7 +57,7 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
     protected void addEvent(XMLEvent event) {
         events.add(event);
     }
-    
+
     public List<XMLEvent> getEvents() {
         return events;
     }
@@ -109,11 +109,11 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
     }
 
     public void writeCharacters(String arg0) throws XMLStreamException {
-        addEvent(factory.createCharacters(arg0));        
+        addEvent(factory.createCharacters(arg0));
     }
 
     public void writeCharacters(char[] arg0, int arg1, int arg2) throws XMLStreamException {
-        addEvent(factory.createCharacters(new String(arg0, arg1, arg2)));                
+        addEvent(factory.createCharacters(new String(arg0, arg1, arg2)));
     }
 
     public void writeComment(String arg0) throws XMLStreamException {
@@ -121,7 +121,7 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
     }
 
     public void writeDTD(String arg0) throws XMLStreamException {
-        addEvent(factory.createDTD(arg0));        
+        addEvent(factory.createDTD(arg0));
     }
 
     public void writeEndDocument() throws XMLStreamException {
@@ -130,16 +130,16 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
 
 
     public void writeEntityRef(String arg0) throws XMLStreamException {
-        addEvent(factory.createEntityReference(arg0, null));        
+        addEvent(factory.createEntityReference(arg0, null));
     }
 
 
     public void writeProcessingInstruction(String arg0) throws XMLStreamException {
-        addEvent(factory.createProcessingInstruction(arg0, null));                
+        addEvent(factory.createProcessingInstruction(arg0, null));
     }
 
     public void writeProcessingInstruction(String arg0, String arg1) throws XMLStreamException {
-        addEvent(factory.createProcessingInstruction(arg0, arg1));        
+        addEvent(factory.createProcessingInstruction(arg0, arg1));
     }
 
     public void writeStartDocument() throws XMLStreamException {
@@ -147,33 +147,33 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
     }
 
     public void writeStartDocument(String version) throws XMLStreamException {
-        addEvent(factory.createStartDocument(null, version));        
+        addEvent(factory.createStartDocument(null, version));
     }
 
     public void writeStartDocument(String arg0, String arg1) throws XMLStreamException {
-        addEvent(factory.createStartDocument(arg0, arg1));        
+        addEvent(factory.createStartDocument(arg0, arg1));
     }
-    
+
     public void setDefaultNamespace(String ns) throws XMLStreamException {
         curContext.addNs("", ns);
     }
 
-    
+
     public void writeNamespace(String pfx, String ns) throws XMLStreamException {
         curContext.addNs(pfx, ns);
         if (StringUtils.isEmpty(pfx)) {
-            addEvent(factory.createNamespace(ns));            
+            addEvent(factory.createNamespace(ns));
         } else {
             addEvent(factory.createNamespace(pfx, ns));
-        } 
+        }
     }
-    
+
     public void writeAttribute(String uri, String name, String value) throws XMLStreamException {
         if (!StringUtils.isEmpty(uri)) {
             String pfx = StaxUtils.getUniquePrefix(this, uri, false);
-            addEvent(factory.createAttribute(pfx, uri, name, value));            
-        } else {            
-            addEvent(factory.createAttribute(name, value));            
+            addEvent(factory.createAttribute(pfx, uri, name, value));
+        } else {
+            addEvent(factory.createAttribute(name, value));
         }
     }
     public void setPrefix(String pfx, String uri) throws XMLStreamException {
@@ -182,17 +182,17 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
 
 
     public void writeEndElement() throws XMLStreamException {
-        addEvent(factory.createEndElement(lastStart, 
+        addEvent(factory.createEndElement(lastStart,
                                           Collections.<javax.xml.stream.events.Namespace>emptyList().iterator()));
         curContext = contexts.pop();
         lastStart = elNames.pop();
     }
-    
-    
+
+
     public void writeDefaultNamespace(String ns) throws XMLStreamException {
         writeNamespace("", ns);
     }
-    
+
     public void writeEmptyElement(String name) throws XMLStreamException {
         writeStartElement(name);
         writeEndElement();
@@ -205,7 +205,7 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
         writeStartElement(pfx, name, ns);
         writeEndElement();
     }
-    
+
     public void writeStartElement(String name) throws XMLStreamException {
         elNames.push(lastStart);
         contexts.push(curContext);
@@ -233,18 +233,18 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
                                             Collections.EMPTY_SET.iterator(),
                                             Collections.EMPTY_SET.iterator()));
     }
-    
+
     public static class NSContext implements NamespaceContext {
         NamespaceContext parent;
         Map<String, String> map = new HashMap<String, String>();
-        
+
         public NSContext(NamespaceContext p) {
             parent = p;
         }
         public void addNs(String pfx, String ns) {
             map.put(pfx, ns);
         }
-        
+
         public String getNamespaceURI(String prefix) {
             String ret = map.get(prefix);
             if (ret == null && parent != null) {
@@ -282,6 +282,6 @@ public class CachingXmlEventWriter implements XMLStreamWriter {
             }
             return l.iterator();
         }
-        
+
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java b/core/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java
index 25918ac..35b0496 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/DelegatingXMLStreamWriter.java
@@ -26,11 +26,11 @@ import javax.xml.stream.XMLStreamWriter;
 
 public class DelegatingXMLStreamWriter implements XMLStreamWriter {
     protected final XMLStreamWriter delegate;
-    
+
     public DelegatingXMLStreamWriter(XMLStreamWriter del) {
         delegate = del;
     }
-    
+
     public void close() throws XMLStreamException {
         delegate.close();
     }
@@ -43,9 +43,9 @@ public class DelegatingXMLStreamWriter implements XMLStreamWriter {
         return delegate.getNamespaceContext();
     }
 
-    
-    
-    
+
+
+
     public String getPrefix(String uri) throws XMLStreamException {
         return delegate.getPrefix(uri);
     }
@@ -66,7 +66,7 @@ public class DelegatingXMLStreamWriter implements XMLStreamWriter {
         delegate.setPrefix(pfx, uri);
     }
 
-    public void writeAttribute(String prefix, String uri, 
+    public void writeAttribute(String prefix, String uri,
                                String local, String value) throws XMLStreamException {
         delegate.writeAttribute(prefix, uri, local, value);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/DepthExceededStaxException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/DepthExceededStaxException.java b/core/src/main/java/org/apache/cxf/staxutils/DepthExceededStaxException.java
index e396b63..ffaed7a 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/DepthExceededStaxException.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/DepthExceededStaxException.java
@@ -21,11 +21,11 @@ package org.apache.cxf.staxutils;
 public class DepthExceededStaxException extends RuntimeException {
 
     private static final long serialVersionUID = 4750070687283463619L;
-    
+
     public DepthExceededStaxException() {
-        
+
     }
-    
+
     public DepthExceededStaxException(String message) {
         super(message);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/DepthRestrictingStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/DepthRestrictingStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/DepthRestrictingStreamReader.java
index 69c1269..7b011a4 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/DepthRestrictingStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/DepthRestrictingStreamReader.java
@@ -29,39 +29,39 @@ import javax.xml.stream.XMLStreamReader;
  * - total number of elements in the document
  * - the maximum depth of the given element; the root element will be checked by default
  * - the maximum number of immediate child nodes for individual elements
- * 
- * More sophisticated policies can be supported in the future.      
+ *
+ * More sophisticated policies can be supported in the future.
  */
 public class DepthRestrictingStreamReader extends DepthXMLStreamReader {
-    
+
     private DocumentDepthProperties props;
     private int totalElementCount;
     private Stack<Integer> stack = new Stack<Integer>();
-    
+
     public DepthRestrictingStreamReader(XMLStreamReader reader,
                                         int elementCountThreshold,
                                         int innerElementLevelThreshold,
                                         int innerElementCountThreshold) {
-        this(reader, new DocumentDepthProperties(elementCountThreshold, 
+        this(reader, new DocumentDepthProperties(elementCountThreshold,
                                                  innerElementLevelThreshold,
                                                  innerElementCountThreshold));
     }
-    
+
     public DepthRestrictingStreamReader(XMLStreamReader reader,
                                         DocumentDepthProperties props) {
         super(reader);
         this.props = props;
     }
-    
+
     @Override
     public int next() throws XMLStreamException {
         int next = super.next();
         if (next == START_ELEMENT) {
-            if (props.getInnerElementLevelThreshold() != -1 
+            if (props.getInnerElementLevelThreshold() != -1
                 && getDepth() >= props.getInnerElementLevelThreshold()) {
                 throw new DepthExceededStaxException();
             }
-            if (props.getElementCountThreshold() != -1 
+            if (props.getElementCountThreshold() != -1
                 && ++totalElementCount >= props.getElementCountThreshold()) {
                 throw new DepthExceededStaxException();
             }
@@ -73,10 +73,10 @@ public class DepthRestrictingStreamReader extends DepthXMLStreamReader {
                     } else {
                         stack.push(currentCount);
                     }
-                } 
+                }
                 stack.push(0);
             }
-            
+
         } else if (next == END_ELEMENT && props.getInnerElementCountThreshold() != -1) {
             stack.pop();
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
index 4f4bf8a..21db10b 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
@@ -85,7 +85,7 @@ public class DepthXMLStreamReader implements XMLStreamReader {
 
     public String getElementText() throws XMLStreamException {
         String ret = reader.getElementText();
-        //workaround bugs in some readers that aren't properly advancing to 
+        //workaround bugs in some readers that aren't properly advancing to
         //the END_ELEMENT (*cough*jettison*cough*)
         while (reader.getEventType() != XMLStreamReader.END_ELEMENT) {
             reader.next();
@@ -218,13 +218,13 @@ public class DepthXMLStreamReader implements XMLStreamReader {
 
     public int next() throws XMLStreamException {
         int next = reader.next();
-        
+
         if (next == START_ELEMENT) {
             depth++;
         } else if (next == END_ELEMENT) {
             depth--;
         }
-        
+
         return next;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java b/core/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java
index d1c2000..a904e63 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java
@@ -19,30 +19,30 @@
 package org.apache.cxf.staxutils;
 
 public class DocumentDepthProperties {
-    
+
     public static final String TOTAL_ELEMENT_COUNT = "depthTotalElementCountThreshold";
     public static final String INNER_ELEMENT_COUNT = "depthInnerElementCountThreshold";
     public static final String INNER_ELEMENT_LEVEL = "depthInnerElementLevelThreshold";
-    
+
     private int elementCountThreshold = -1;
     private int innerElementLevelThreshold = -1;
     private int innerElementCountThreshold = -1;
     public DocumentDepthProperties() {
-        
+
     }
     public DocumentDepthProperties(int elementCountThreshold,
                                    int innerElementLevelThreshold,
                                    int innerElementCountThreshold) {
         this.elementCountThreshold = elementCountThreshold;
         this.innerElementLevelThreshold = innerElementLevelThreshold;
-        this.innerElementCountThreshold = innerElementCountThreshold;    
+        this.innerElementCountThreshold = innerElementCountThreshold;
     }
-    
+
     public boolean isEffective() {
         return elementCountThreshold != -1 || innerElementLevelThreshold != -1
             || innerElementCountThreshold != -1;
     }
-    
+
     public void setElementCountThreshold(int elementCountThreshold) {
         this.elementCountThreshold = elementCountThreshold;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/FragmentStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/FragmentStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/FragmentStreamReader.java
index d3982c7..b309a3f 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/FragmentStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/FragmentStreamReader.java
@@ -35,10 +35,10 @@ public class FragmentStreamReader extends DepthXMLStreamReader {
     private int current = XMLStreamReader.START_DOCUMENT;
     private boolean filter = true;
     private boolean advanceAtEnd = true;
-    
+
     public FragmentStreamReader(XMLStreamReader reader) {
         super(reader);
-    }    
+    }
     public FragmentStreamReader(XMLStreamReader reader, boolean doDocEvents) {
         super(reader);
         this.doDocEvents = doDocEvents;
@@ -49,12 +49,12 @@ public class FragmentStreamReader extends DepthXMLStreamReader {
                 startElement = true;
             }
         }
-    }    
-   
+    }
+
     public int getEventType() {
         return current;
     }
-    
+
     public boolean isCharacters() {
         return current == XMLStreamReader.CHARACTERS;
     }
@@ -69,31 +69,31 @@ public class FragmentStreamReader extends DepthXMLStreamReader {
 
     public boolean isWhiteSpace() {
         return current == XMLStreamReader.CHARACTERS && reader.isWhiteSpace();
-    }    
+    }
 
     public boolean hasNext() throws XMLStreamException {
-        
+
         if (endDoc) {
             return false;
         }
-        
+
         return reader.hasNext();
     }
-    
+
     public final int next() throws XMLStreamException {
         if (!startElement) {
             depth = getDepth();
-            
+
             current = reader.getEventType();
-            
+
             if (filter) {
                 while (current != START_ELEMENT && depth >= getDepth() && super.hasNext()) {
                     current = super.next();
                 }
-                
+
                 filter = false;
             }
-            
+
             startElement = true;
             current = START_ELEMENT;
         } else if (middle) {
@@ -110,7 +110,7 @@ public class FragmentStreamReader extends DepthXMLStreamReader {
             if (advanceAtEnd) {
                 super.next();
             }
-            
+
             endDoc = true;
             current = END_DOCUMENT;
         } else {
@@ -131,6 +131,6 @@ public class FragmentStreamReader extends DepthXMLStreamReader {
      */
     public void setAdvanceAtEnd(boolean a) {
         this.advanceAtEnd = a;
-    }    
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/OverlayW3CDOMStreamWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/OverlayW3CDOMStreamWriter.java b/core/src/main/java/org/apache/cxf/staxutils/OverlayW3CDOMStreamWriter.java
index 475973a..3eef44b 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/OverlayW3CDOMStreamWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/OverlayW3CDOMStreamWriter.java
@@ -43,7 +43,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
 
     List<Boolean> isOverlaidStack = new LinkedList<Boolean>();
     Boolean textOverlay;
-    
+
     public OverlayW3CDOMStreamWriter(Document document) {
         super(document);
     }
@@ -107,7 +107,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
                 } catch (Throwable t) {
                     //ignore - non DOM level 3
                 }
-                if (nd2.getNodeType() == Node.ELEMENT_NODE 
+                if (nd2.getNodeType() == Node.ELEMENT_NODE
                     && local.equals(nd2.getLocalName())
                     && StringUtils.isEmpty(nd2.getNamespaceURI())
                     && userData != null) {
@@ -148,7 +148,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
                 } catch (Throwable t) {
                     //ignore - non DOM level 3
                 }
-                if (nd2.getNodeType() == Node.ELEMENT_NODE 
+                if (nd2.getNodeType() == Node.ELEMENT_NODE
                     && local.equals(nd2.getLocalName())
                     && namespace.equals(nd2.getNamespaceURI())
                     && userData == null) {
@@ -182,7 +182,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
                 } else {
                     nd2 = nd.getFirstChild();
                 }
-                
+
                 while (nd2 != null) {
                     Object userData = null;
                     try {
@@ -191,7 +191,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
                         //ignore - non DOM level 3
                     }
 
-                    if (nd2.getNodeType() == Node.ELEMENT_NODE 
+                    if (nd2.getNodeType() == Node.ELEMENT_NODE
                         && local.equals(nd2.getLocalName())
                         && namespace.equals(nd2.getNamespaceURI())
                         && userData == null) {
@@ -212,7 +212,7 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
             textOverlay = false;
         }
     }
-    
+
     public void writeCharacters(String text) throws XMLStreamException {
         if (!isOverlaid || textOverlay == null) {
             super.writeCharacters(text);
@@ -226,8 +226,8 @@ public class OverlayW3CDOMStreamWriter extends W3CDOMStreamWriter {
             }
             super.writeCharacters(text);
         }
-        
+
     }
 
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
index fb4f2b0..5e3f564 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
@@ -33,7 +33,7 @@ public class PartialXMLStreamReader extends DepthXMLStreamReader {
     private boolean foundEnd;
     private int endDepth;
     private int currentEvent;
-    
+
     public PartialXMLStreamReader(XMLStreamReader r, QName endTag) {
         super(r);
         this.endTag = endTag;
@@ -42,7 +42,7 @@ public class PartialXMLStreamReader extends DepthXMLStreamReader {
 
     @Override
     public int next() throws XMLStreamException {
-        if (!foundEnd) { 
+        if (!foundEnd) {
             currentEvent = super.next();
 
             if (currentEvent == START_ELEMENT && getName().equals(endTag)) {
@@ -50,7 +50,7 @@ public class PartialXMLStreamReader extends DepthXMLStreamReader {
                 endDepth = getDepth();
                 return START_ELEMENT;
             }
-            
+
             return currentEvent;
         } else if (endDepth > 0) {
             endDepth--;
@@ -58,7 +58,7 @@ public class PartialXMLStreamReader extends DepthXMLStreamReader {
         } else {
             currentEvent = END_DOCUMENT;
         }
-        
+
         return currentEvent;
     }
 
@@ -71,6 +71,6 @@ public class PartialXMLStreamReader extends DepthXMLStreamReader {
     public boolean hasNext() {
         return currentEvent != END_DOCUMENT;
     }
-    
-    
+
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/PrettyPrintXMLStreamWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/PrettyPrintXMLStreamWriter.java b/core/src/main/java/org/apache/cxf/staxutils/PrettyPrintXMLStreamWriter.java
index 73b5d0c..8de6158 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/PrettyPrintXMLStreamWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/PrettyPrintXMLStreamWriter.java
@@ -62,7 +62,7 @@ public class PrettyPrintXMLStreamWriter implements XMLStreamWriter {
     public void indent() {
         curIndent += indentAmount;
     }
-    
+
     public void unindent() {
         curIndent -= indentAmount;
     }
@@ -206,16 +206,16 @@ public class PrettyPrintXMLStreamWriter implements XMLStreamWriter {
         throws XMLStreamException {
         baseWriter.writeStartDocument(encoding, version);
     }
-     
+
     public void writeStartElement(java.lang.String localName) throws XMLStreamException {
         writeStartElement(null, localName, null);
     }
-     
+
     public void writeStartElement(java.lang.String namespaceURI, java.lang.String localName)
         throws XMLStreamException {
         writeStartElement(null, localName, namespaceURI);
     }
-     
+
     public void writeStartElement(java.lang.String prefix,
                            java.lang.String localName,
                            java.lang.String namespaceURI) throws XMLStreamException {
@@ -232,7 +232,7 @@ public class PrettyPrintXMLStreamWriter implements XMLStreamWriter {
         if (prefix == null && namespaceURI == null) {
             baseWriter.writeStartElement(localName);
         } else if (prefix == null) {
-            baseWriter.writeStartElement(namespaceURI, localName);            
+            baseWriter.writeStartElement(namespaceURI, localName);
         } else {
             baseWriter.writeStartElement(prefix, localName, namespaceURI);
         }
@@ -260,5 +260,5 @@ public class PrettyPrintXMLStreamWriter implements XMLStreamWriter {
             hasChildElements = childElements;
         }
     }
-     
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/PropertiesExpandingStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/PropertiesExpandingStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/PropertiesExpandingStreamReader.java
index 0e89237..8cfc89c 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/PropertiesExpandingStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/PropertiesExpandingStreamReader.java
@@ -26,14 +26,14 @@ import javax.xml.stream.util.StreamReaderDelegate;
 
 /**
  * A StreamReaderDelegate that expands property references in element and attribute values.
- * 
+ *
  */
 public class PropertiesExpandingStreamReader extends StreamReaderDelegate {
 
     public static final String DELIMITER = "@";
-    
+
     private final Map<String, String> props;
-    
+
     public PropertiesExpandingStreamReader(XMLStreamReader reader, Map<String, String> props) {
         super(reader);
         this.props = props;
@@ -43,7 +43,7 @@ public class PropertiesExpandingStreamReader extends StreamReaderDelegate {
         if (isEmpty(value)) {
             return value;
         }
-        
+
         final int startIndx = value.indexOf(DELIMITER);
         if (startIndx > -1) {
             final int endIndx = value.lastIndexOf(DELIMITER);
@@ -61,7 +61,7 @@ public class PropertiesExpandingStreamReader extends StreamReaderDelegate {
                 }
             }
         }
-        
+
         return value;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/StaxSource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxSource.java b/core/src/main/java/org/apache/cxf/staxutils/StaxSource.java
index 6b85345..a06944e 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxSource.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxSource.java
@@ -43,7 +43,7 @@ public class StaxSource extends SAXSource implements XMLReader {
     private XMLStreamReader streamReader;
 
     private ContentHandler contentHandler;
-    
+
     private LexicalHandler lexicalHandler;
 
     public StaxSource(XMLStreamReader streamReader) {
@@ -102,7 +102,7 @@ public class StaxSource extends SAXSource implements XMLReader {
                         int start = streamReader.getTextStart();
                         char[] chars = streamReader.getTextCharacters();
                         lexicalHandler.comment(chars, start, length);
-                    } 
+                    }
                     break;
                 case XMLStreamConstants.DTD:
                     break;
@@ -113,7 +113,7 @@ public class StaxSource extends SAXSource implements XMLReader {
                     String uri = streamReader.getNamespaceURI();
                     String localName = streamReader.getLocalName();
                     String prefix = streamReader.getPrefix();
-                    String qname = prefix != null && prefix.length() > 0 
+                    String qname = prefix != null && prefix.length() > 0
                         ? prefix + ":" + localName : localName;
                     contentHandler.endElement(uri, localName, qname);
                     // namespaces
@@ -141,7 +141,7 @@ public class StaxSource extends SAXSource implements XMLReader {
                     String uri = streamReader.getNamespaceURI();
                     String localName = streamReader.getLocalName();
                     String prefix = streamReader.getPrefix();
-                    String qname = prefix != null && prefix.length() > 0 
+                    String qname = prefix != null && prefix.length() > 0
                         ? prefix + ":" + localName : localName;
                     // namespaces
                     for (int i = 0; i < streamReader.getNamespaceCount(); i++) {
@@ -214,7 +214,7 @@ public class StaxSource extends SAXSource implements XMLReader {
         return false;
     }
 
-    public void setFeature(String name, boolean value) 
+    public void setFeature(String name, boolean value)
         throws SAXNotRecognizedException, SAXNotSupportedException {
     }
 
@@ -222,7 +222,7 @@ public class StaxSource extends SAXSource implements XMLReader {
         return null;
     }
 
-    public void setProperty(String name, Object value) 
+    public void setProperty(String name, Object value)
         throws SAXNotRecognizedException, SAXNotSupportedException {
         if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
             lexicalHandler = (LexicalHandler) value;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index 49796b6..4cc7088 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -97,80 +97,80 @@ import org.apache.cxf.message.Message;
 public final class StaxUtils {
     // System properties for defaults, but also contextual properties usable
     // for StaxInInterceptor
-    public static final String MAX_CHILD_ELEMENTS = 
+    public static final String MAX_CHILD_ELEMENTS =
         "org.apache.cxf.stax.maxChildElements";
-    public static final String MAX_ELEMENT_DEPTH = 
+    public static final String MAX_ELEMENT_DEPTH =
         "org.apache.cxf.stax.maxElementDepth";
-    public static final String MAX_ATTRIBUTE_COUNT = 
+    public static final String MAX_ATTRIBUTE_COUNT =
         "org.apache.cxf.stax.maxAttributeCount";
-    public static final String MAX_ATTRIBUTE_SIZE = 
+    public static final String MAX_ATTRIBUTE_SIZE =
         "org.apache.cxf.stax.maxAttributeSize";
-    public static final String MAX_TEXT_LENGTH = 
+    public static final String MAX_TEXT_LENGTH =
         "org.apache.cxf.stax.maxTextLength";
     public static final String MIN_TEXT_SEGMENT =
         "org.apache.cxf.stax.minTextSegment";
-    public static final String MAX_ELEMENT_COUNT = 
+    public static final String MAX_ELEMENT_COUNT =
         "org.apache.cxf.stax.maxElementCount";
-    public static final String MAX_XML_CHARACTERS = 
+    public static final String MAX_XML_CHARACTERS =
         "org.apache.cxf.stax.maxXMLCharacters";
 
-    public static final String ALLOW_INSECURE_PARSER = 
+    public static final String ALLOW_INSECURE_PARSER =
         "org.apache.cxf.stax.allowInsecureParser";
-    
-    private static final String INNER_ELEMENT_COUNT_SYSTEM_PROP = 
+
+    private static final String INNER_ELEMENT_COUNT_SYSTEM_PROP =
         "org.apache.cxf.staxutils.innerElementCountThreshold";
-    private static final String INNER_ELEMENT_LEVEL_SYSTEM_PROP = 
+    private static final String INNER_ELEMENT_LEVEL_SYSTEM_PROP =
         "org.apache.cxf.staxutils.innerElementLevelThreshold";
-    
+
     private static final Logger LOG = LogUtils.getL7dLogger(StaxUtils.class);
-    
+
     private static final BlockingQueue<XMLInputFactory> NS_AWARE_INPUT_FACTORY_POOL;
     private static final XMLInputFactory SAFE_INPUT_FACTORY;
     private static final BlockingQueue<XMLOutputFactory> OUTPUT_FACTORY_POOL;
     private static final XMLOutputFactory SAFE_OUTPUT_FACTORY;
-    
+
     private static final String XML_NS = "http://www.w3.org/2000/xmlns/";
     private static final String DEF_PREFIXES[] = new String[] {
         "ns1".intern(), "ns2".intern(), "ns3".intern(),
         "ns4".intern(), "ns5".intern(), "ns6".intern(),
         "ns7".intern(), "ns8".intern(), "ns9".intern()
     };
-    
+
     private static int innerElementLevelThreshold = 100;
     private static int innerElementCountThreshold = 50000;
-    private static int maxAttributeCount = 500; 
+    private static int maxAttributeCount = 500;
     private static int maxAttributeSize = 64 * 1024; //64K per attribute, likely just "list" will hit
-    private static int maxTextLength = 128 * 1024 * 1024;  //128M - more than this should DEFINITLEY use MTOM 
+    private static int maxTextLength = 128 * 1024 * 1024;  //128M - more than this should DEFINITLEY use MTOM
     private static int minTextSegment = 64; // Same default as woodstox
     private static long maxElementCount = Long.MAX_VALUE;
     private static long maxXMLCharacters = Long.MAX_VALUE;
-    
+
     private static boolean allowInsecureParser;
-    
+
     static {
         int i = getInteger("org.apache.cxf.staxutils.pool-size", 20);
-    
+
         NS_AWARE_INPUT_FACTORY_POOL = new ArrayBlockingQueue<XMLInputFactory>(i);
         OUTPUT_FACTORY_POOL = new ArrayBlockingQueue<XMLOutputFactory>(i);
-        
+
         //old names
         innerElementCountThreshold = getInteger(INNER_ELEMENT_COUNT_SYSTEM_PROP, innerElementCountThreshold);
         innerElementLevelThreshold = getInteger(INNER_ELEMENT_LEVEL_SYSTEM_PROP, innerElementLevelThreshold);
         //new names
         innerElementCountThreshold = getInteger(MAX_CHILD_ELEMENTS, innerElementCountThreshold);
         innerElementLevelThreshold = getInteger(MAX_ELEMENT_DEPTH, innerElementLevelThreshold);
-        maxAttributeCount = getInteger(MAX_ATTRIBUTE_COUNT, maxAttributeCount); 
+        maxAttributeCount = getInteger(MAX_ATTRIBUTE_COUNT, maxAttributeCount);
         maxAttributeSize = getInteger(MAX_ATTRIBUTE_SIZE, maxAttributeSize);
-        maxTextLength = getInteger(MAX_TEXT_LENGTH, maxTextLength); 
+        maxTextLength = getInteger(MAX_TEXT_LENGTH, maxTextLength);
         minTextSegment = getInteger(MIN_TEXT_SEGMENT, minTextSegment);
         maxElementCount = getLong(MAX_ELEMENT_COUNT, maxElementCount);
         maxXMLCharacters = getLong(MAX_XML_CHARACTERS, maxXMLCharacters);
-        
+
         String s = SystemPropertyAction.getPropertyOrNull(ALLOW_INSECURE_PARSER);
         if (!StringUtils.isEmpty(s)) {
             allowInsecureParser = "1".equals(s) || Boolean.parseBoolean(s);
         }
-        
+
         XMLInputFactory xif = null;
         try {
             xif = createXMLInputFactory(true);
@@ -184,7 +184,7 @@ public final class StaxUtils {
             xif = null;
         }
         SAFE_INPUT_FACTORY = xif;
-        
+
         XMLOutputFactory xof = null;
         try {
             xof = XMLOutputFactory.newInstance();
@@ -197,9 +197,9 @@ public final class StaxUtils {
             //ignore, can always drop down to the pooled factories
         }
         SAFE_OUTPUT_FACTORY = xof;
-        
+
     }
-    
+
     private StaxUtils() {
     }
     private static int getInteger(String prop, int def) {
@@ -234,7 +234,7 @@ public final class StaxUtils {
         }
         return def;
     }
-    
+
     public static void setInnerElementLevelThreshold(int i) {
         if (i == -1) {
             i = 500;
@@ -251,11 +251,11 @@ public final class StaxUtils {
     }
 
     /**
-     * CXF works with multiple STaX parsers. When we can't find any other way to work 
+     * CXF works with multiple STaX parsers. When we can't find any other way to work
      * against the different parsers, this can be used to condition code. Note: if you've got
      * Woodstox in the class path without being the default provider, this will return
      * the wrong answer.
-     * @return true if Woodstox is in the classpath. 
+     * @return true if Woodstox is in the classpath.
      */
     public static boolean isWoodstox() {
         try {
@@ -265,7 +265,7 @@ public final class StaxUtils {
         }
         return true;
     }
-    
+
     /**
      * Return a cached, namespace-aware, factory.
      */
@@ -279,13 +279,13 @@ public final class StaxUtils {
         }
         return f;
     }
-    
+
     private static void returnXMLInputFactory(XMLInputFactory factory) {
         if (SAFE_INPUT_FACTORY != factory) {
             NS_AWARE_INPUT_FACTORY_POOL.offer(factory);
         }
     }
-    
+
     private static XMLOutputFactory getXMLOutputFactory() {
         if (SAFE_OUTPUT_FACTORY != null) {
             return SAFE_OUTPUT_FACTORY;
@@ -296,17 +296,17 @@ public final class StaxUtils {
         }
         return f;
     }
-    
+
     private static void returnXMLOutputFactory(XMLOutputFactory factory) {
         if (SAFE_OUTPUT_FACTORY != factory) {
             OUTPUT_FACTORY_POOL.offer(factory);
         }
     }
-    
+
     /**
      * Return a new factory so that the caller can set sticky parameters.
      * @param nsAware
-     * @throws XMLStreamException 
+     * @throws XMLStreamException
      */
     public static XMLInputFactory createXMLInputFactory(boolean nsAware) {
         XMLInputFactory factory = null;
@@ -326,11 +326,11 @@ public final class StaxUtils {
                     LOG.log(Level.FINE, "Cannot create Woodstox XMLInputFactory: ", t);
                 }
             }
-            
+
             if (factory == null) {
                 throw new RuntimeException("Failed to create XMLInputFactory.");
             }
-            
+
             if (!setRestrictionProperties(factory)) {
                 if (allowInsecureParser) {
                     LOG.log(Level.WARNING, "INSECURE_PARSER_DETECTED", factory.getClass().getName());
@@ -350,18 +350,18 @@ public final class StaxUtils {
                 throw new XMLStreamException("Reading external entities is disabled");
             }
         });
-        
+
         return factory;
     }
-    
+
     private static XMLInputFactory createWoodstoxFactory() {
         return WoodstoxHelper.createInputFactory();
     }
-    
+
     public static XMLEventFactory createWoodstoxEventFactory() {
         return WoodstoxHelper.createEventFactory();
     }
-    
+
     private static boolean setRestrictionProperties(XMLInputFactory factory) {
         //For now, we can only support Woodstox 4.2.x and newer as none of the other
         //stax parsers support these settings
@@ -386,7 +386,7 @@ public final class StaxUtils {
         return false;
     }
 
-    
+
 
     public static XMLStreamWriter createXMLStreamWriter(Writer out) {
         XMLOutputFactory factory = getXMLOutputFactory();
@@ -397,8 +397,8 @@ public final class StaxUtils {
         } finally {
             returnXMLOutputFactory(factory);
         }
-    } 
-    
+    }
+
     public static XMLStreamWriter createXMLStreamWriter(OutputStream out) {
         return createXMLStreamWriter(out, null);
     }
@@ -416,10 +416,10 @@ public final class StaxUtils {
             returnXMLOutputFactory(factory);
         }
     }
-    
+
     public static XMLStreamWriter createXMLStreamWriter(Result r) {
         if (r instanceof DOMResult) {
-            //use our own DOM writer to avoid issues with Sun's 
+            //use our own DOM writer to avoid issues with Sun's
             //version that doesn't support getNamespaceContext
             DOMResult dr = (DOMResult)r;
             Node nd = dr.getNode();
@@ -452,7 +452,7 @@ public final class StaxUtils {
         }
     }
 
-    
+
     public static void nextEvent(XMLStreamReader dr) {
         try {
             dr.next();
@@ -500,7 +500,7 @@ public final class StaxUtils {
             int depth = reader.getDepth();
             int event = reader.getEventType();
             while (reader.getDepth() >= depth && reader.hasNext()) {
-                if (event == XMLStreamReader.START_ELEMENT && reader.getName().equals(endTag) 
+                if (event == XMLStreamReader.START_ELEMENT && reader.getName().equals(endTag)
                     && reader.getDepth() == depth + 1) {
                     return true;
                 }
@@ -510,8 +510,8 @@ public final class StaxUtils {
         } catch (XMLStreamException e) {
             throw new RuntimeException("Couldn't parse stream.", e);
         }
-    }    
-    
+    }
+
     public static void writeStartElement(XMLStreamWriter writer, String prefix, String name, String namespace)
         throws XMLStreamException {
         if (prefix == null) {
@@ -634,7 +634,7 @@ public final class StaxUtils {
                     return;
                 }
             }
-       
+
         } else if (source instanceof StreamSource) {
             StreamSource ss = (StreamSource)source;
             if (ss.getInputStream() == null
@@ -649,9 +649,9 @@ public final class StaxUtils {
         reader.close();
     }
 
-    public static Document copy(Document doc) 
+    public static Document copy(Document doc)
         throws XMLStreamException, ParserConfigurationException {
-        
+
         XMLStreamReader reader = createXMLStreamReader(doc);
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
         copy(reader, writer);
@@ -671,14 +671,14 @@ public final class StaxUtils {
         XMLStreamReader reader = createXMLStreamReader(node);
         copy(reader, writer);
     }
-    
+
     public static void copy(XMLStreamReader reader, OutputStream os)
         throws XMLStreamException {
         XMLStreamWriter xsw = StaxUtils.createXMLStreamWriter(os);
         StaxUtils.copy(reader, xsw);
         xsw.close();
     }
-    
+
     public static void writeTo(Node node, OutputStream os) throws XMLStreamException {
         copy(new DOMSource(node), os);
     }
@@ -707,15 +707,15 @@ public final class StaxUtils {
         } finally {
             writer.close();
         }
-    }    
-    
-    
+    }
+
+
     /**
      * Copies the reader to the writer. The start and end document methods must
      * be handled on the writer manually. TODO: if the namespace on the reader
      * has been declared previously to where we are in the stream, this probably
      * won't work.
-     * 
+     *
      * @param reader
      * @param writer
      * @throws XMLStreamException
@@ -723,7 +723,7 @@ public final class StaxUtils {
     public static void copy(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException {
         copy(reader, writer, false, false);
     }
-    public static void copy(XMLStreamReader reader, XMLStreamWriter writer, boolean fragment) 
+    public static void copy(XMLStreamReader reader, XMLStreamWriter writer, boolean fragment)
         throws XMLStreamException {
         copy(reader, writer, fragment, false);
     }
@@ -743,17 +743,17 @@ public final class StaxUtils {
                 read++;
                 if (isThreshold) {
                     elementCount++;
-                    
-                    if (innerElementLevelThreshold != -1 
+
+                    if (innerElementLevelThreshold != -1
                         && read >= innerElementLevelThreshold) {
-                        throw new DepthExceededStaxException("reach the innerElementLevelThreshold:" 
+                        throw new DepthExceededStaxException("reach the innerElementLevelThreshold:"
                                                    + innerElementLevelThreshold);
                     }
-                    if (innerElementCountThreshold != -1 
+                    if (innerElementCountThreshold != -1
                         && elementCount >= innerElementCountThreshold) {
-                        throw new DepthExceededStaxException("reach the innerElementCountThreshold:" 
+                        throw new DepthExceededStaxException("reach the innerElementCountThreshold:"
                                                    + innerElementCountThreshold);
-                    }                
+                    }
                     countStack.push(elementCount);
                     elementCount = 0;
                 }
@@ -801,13 +801,13 @@ public final class StaxUtils {
         String uri = reader.getNamespaceURI();
         String prefix = reader.getPrefix();
         String local = reader.getLocalName();
-        
+
         if (prefix == null) {
             prefix = "";
         }
 
         boolean writeElementNS = false;
-        
+
         if (uri != null) {
             writeElementNS = true;
             Iterator<String> it = CastUtils.cast(writer.getNamespaceContext().getPrefixes(uri));
@@ -825,7 +825,7 @@ public final class StaxUtils {
                 }
             }
         }
-        
+
         // Write out the element name
         if (uri != null) {
             if (prefix.length() == 0 && StringUtils.isEmpty(uri)) {
@@ -854,7 +854,7 @@ public final class StaxUtils {
                 writer.writeNamespace(nsPrefix, nsURI);
                 writer.setPrefix(nsPrefix, nsURI);
             }
-            
+
             if (nsURI.equals(uri) && nsPrefix.equals(prefix)) {
                 writeElementNS = false;
             }
@@ -871,8 +871,8 @@ public final class StaxUtils {
                 writer.writeNamespace(prefix, uri);
                 writer.setPrefix(prefix, uri);
             }
-        }        
-        
+        }
+
         // Write out attributes
         for (int i = 0; i < reader.getAttributeCount(); i++) {
             String ns = reader.getAttributeNamespace(i);
@@ -915,7 +915,7 @@ public final class StaxUtils {
         if (writeProlog) {
             writer.writeStartDocument();
         }
-        
+
         Node node = d.getFirstChild();
         while (node != null) {
             if (writeProlog || node.getNodeType() == Node.ELEMENT_NODE) {
@@ -923,7 +923,7 @@ public final class StaxUtils {
             }
             node = node.getNextSibling();
         }
-        
+
         if (writeProlog) {
             writer.writeEndDocument();
         }
@@ -934,12 +934,12 @@ public final class StaxUtils {
      * started the document (via writeStartDocument()). Also, this probably
      * won't work with just a fragment of a document. The Element should be the
      * root element of the document.
-     * 
+     *
      * @param e
      * @param writer
      * @throws XMLStreamException
      */
-    public static void writeElement(Element e, XMLStreamWriter writer, boolean repairing) 
+    public static void writeElement(Element e, XMLStreamWriter writer, boolean repairing)
         throws XMLStreamException {
         writeElement(e, writer, repairing, true);
     }
@@ -949,7 +949,7 @@ public final class StaxUtils {
      * started the document (via writeStartDocument()). Also, this probably
      * won't work with just a fragment of a document. The Element should be the
      * root element of the document.
-     * 
+     *
      * @param e
      * @param writer
      * @param endElement true if the element should be ended
@@ -986,8 +986,8 @@ public final class StaxUtils {
         } else {
             writer.writeStartElement(prefix, localName, ns);
         }
-        
-        for (Node attr : sortElementAttributes(e.getAttributes())) {          
+
+        for (Node attr : sortElementAttributes(e.getAttributes())) {
 
             String name = attr.getLocalName();
             String attrPrefix = attr.getPrefix();
@@ -997,7 +997,7 @@ public final class StaxUtils {
             if (name == null) {
                 name = attr.getNodeName();
             }
-     
+
             if ("xmlns".equals(attrPrefix)) {
                 writer.writeNamespace(name, attr.getNodeValue());
                 writer.setPrefix(name, attr.getNodeValue());
@@ -1026,7 +1026,7 @@ public final class StaxUtils {
                             writer.writeNamespace(attrPrefix, attns);
                         }
                         writer.writeAttribute(attrPrefix, attns, name, value);
-                    }                    
+                    }
                 }
             }
         }
@@ -1045,7 +1045,7 @@ public final class StaxUtils {
         while (nd != null) {
             writeNode(nd, writer, repairing);
             nd = nd.getNextSibling();
-        }       
+        }
 
         if (endElement) {
             writer.writeEndElement();
@@ -1059,7 +1059,7 @@ public final class StaxUtils {
         List<Node> sortedAttrs = new LinkedList<Node>();
         for (int i = 0; i < attrs.getLength(); i++) {
             Node attr = attrs.item(i);
-            String name = attr.getLocalName();          
+            String name = attr.getLocalName();
             if (name == null) {
                 name = attr.getNodeName();
             }
@@ -1073,9 +1073,9 @@ public final class StaxUtils {
         return sortedAttrs;
     }
 
-    public static void writeNode(Node n, XMLStreamWriter writer, boolean repairing) 
+    public static void writeNode(Node n, XMLStreamWriter writer, boolean repairing)
         throws XMLStreamException {
-        
+
         switch (n.getNodeType()) {
         case Node.ELEMENT_NODE:
             writeElement((Element)n, writer, repairing);
@@ -1120,7 +1120,7 @@ public final class StaxUtils {
             break;
         default:
             throw new IllegalStateException("Found type: " + n.getClass().getName());
-        }        
+        }
     }
 
     public static Document read(Source s) throws XMLStreamException {
@@ -1191,10 +1191,10 @@ public final class StaxUtils {
         readDocElements(doc, doc, reader, true, recordLoc);
         return doc;
     }
-    
-    public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing) 
+
+    public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing)
         throws XMLStreamException {
-        
+
         Document doc = builder == null ? DOMUtils.createDocument() : builder.newDocument();
         if (reader.getLocation().getSystemId() != null) {
             try {
@@ -1222,11 +1222,11 @@ public final class StaxUtils {
             } else {
                 att = e.getAttributeNode("xmlns");
             }
-    
+
             if (att != null && att.getNodeValue().equals(namespaceURI)) {
                 return true;
             }
-    
+
             if (e.getParentNode() instanceof Element) {
                 e = (Element)e.getParentNode();
             } else if (StringUtils.isEmpty(prefix) && StringUtils.isEmpty(namespaceURI)) {
@@ -1238,20 +1238,20 @@ public final class StaxUtils {
         }
         return false;
     }
-    
-    public static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing) 
+
+    public static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing)
         throws XMLStreamException {
         Document doc = getDocument(parent);
         readDocElements(doc, parent, reader, repairing, false);
     }
 
-    public static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing, 
-                                       boolean isThreshold) 
+    public static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing,
+                                       boolean isThreshold)
         throws XMLStreamException {
         Document doc = getDocument(parent);
         readDocElements(doc, parent, reader, repairing, false, isThreshold);
     }
-    
+
     /**
      * @param parent
      * @param reader
@@ -1262,14 +1262,14 @@ public final class StaxUtils {
         throws XMLStreamException {
         readDocElements(doc, parent, reader, repairing, recordLoc, false);
     }
-    
+
     /**
      * @param parent
      * @param reader
      * @throws XMLStreamException
      */
     public static void readDocElements(Document doc, Node parent,
-                                       XMLStreamReader reader, boolean repairing, boolean recordLoc, 
+                                       XMLStreamReader reader, boolean repairing, boolean recordLoc,
                                        boolean isThreshold)
         throws XMLStreamException {
         Stack<Node> stack = new Stack<Node>();
@@ -1281,7 +1281,7 @@ public final class StaxUtils {
                 elementCount++;
                 Element e;
                 if (!StringUtils.isEmpty(reader.getPrefix())) {
-                    e = doc.createElementNS(reader.getNamespaceURI(), 
+                    e = doc.createElementNS(reader.getNamespaceURI(),
                                             reader.getPrefix() + ":" + reader.getLocalName());
                 } else {
                     e = doc.createElementNS(reader.getNamespaceURI(), reader.getLocalName());
@@ -1312,14 +1312,14 @@ public final class StaxUtils {
                     declare(e, reader.getNamespaceURI(), reader.getPrefix());
                 }
                 stack.push(parent);
-                if (isThreshold && innerElementLevelThreshold != -1 
+                if (isThreshold && innerElementLevelThreshold != -1
                     && stack.size() >= innerElementLevelThreshold) {
-                    throw new DepthExceededStaxException("reach the innerElementLevelThreshold:" 
+                    throw new DepthExceededStaxException("reach the innerElementLevelThreshold:"
                                                + innerElementLevelThreshold);
                 }
-                if (isThreshold && innerElementCountThreshold != -1 
+                if (isThreshold && innerElementCountThreshold != -1
                     && elementCount >= innerElementCountThreshold) {
-                    throw new DepthExceededStaxException("reach the innerElementCountThreshold:" 
+                    throw new DepthExceededStaxException("reach the innerElementCountThreshold:"
                                                + innerElementCountThreshold);
                 }
                 parent = e;
@@ -1340,7 +1340,7 @@ public final class StaxUtils {
                 break;
             case XMLStreamConstants.CHARACTERS:
                 if (parent != null) {
-                    recordLoc = addLocation(doc, 
+                    recordLoc = addLocation(doc,
                                             parent.appendChild(doc.createTextNode(reader.getText())),
                                             reader, recordLoc);
                 }
@@ -1351,7 +1351,7 @@ public final class StaxUtils {
                 }
                 break;
             case XMLStreamConstants.CDATA:
-                recordLoc = addLocation(doc, 
+                recordLoc = addLocation(doc,
                                         parent.appendChild(doc.createCDATASection(reader.getText())),
                                         reader, recordLoc);
                 break;
@@ -1370,28 +1370,28 @@ public final class StaxUtils {
             }
         }
     }
-    
+
     public static class StreamToDOMContext {
         private Stack<Node> stack = new Stack<Node>();
         private int elementCount;
         private boolean repairing;
         private boolean recordLoc;
         private boolean threshold;
-        
+
         public StreamToDOMContext(boolean repairing, boolean recordLoc, boolean threshold) {
             this.repairing = repairing;
             this.recordLoc = recordLoc;
             this.threshold = threshold;
         }
-        
+
         public void setRecordLoc(boolean recordLoc) {
             this.recordLoc = recordLoc;
         }
-        
+
         public boolean isRecordLoc() {
             return this.recordLoc;
         }
-        
+
         public boolean isRepairing() {
             return this.repairing;
         }
@@ -1399,36 +1399,36 @@ public final class StaxUtils {
         public boolean isThreshold() {
             return this.threshold;
         }
-        
+
         public int incrementCount() {
             return ++elementCount;
         }
-        
+
         public int decreaseCount() {
             return --elementCount;
         }
-        
+
         public int getCount() {
             return elementCount;
         }
-        
+
         public Node pushToStack(Node node) {
             return stack.push(node);
         }
-        
+
         public Node popFromStack() {
             return stack.pop();
         }
-        
+
         public int getStackSize() {
             return stack.size();
         }
-        
+
         public boolean isStackEmpty() {
             return stack.isEmpty();
         }
     }
-    
+
     public static void readDocElements(Document doc, Node parent, XMLStreamReader reader, StreamToDOMContext context)
         throws XMLStreamException {
         int event = reader.getEventType();
@@ -1438,7 +1438,7 @@ public final class StaxUtils {
                 context.incrementCount();
                 Element e;
                 if (!StringUtils.isEmpty(reader.getPrefix())) {
-                    e = doc.createElementNS(reader.getNamespaceURI(), 
+                    e = doc.createElementNS(reader.getNamespaceURI(),
                                             reader.getPrefix() + ":" + reader.getLocalName());
                 } else {
                     e = doc.createElementNS(reader.getNamespaceURI(), reader.getLocalName());
@@ -1471,14 +1471,14 @@ public final class StaxUtils {
                     declare(e, reader.getNamespaceURI(), reader.getPrefix());
                 }
                 context.pushToStack(parent);
-                if (context.isThreshold() && innerElementLevelThreshold != -1 
+                if (context.isThreshold() && innerElementLevelThreshold != -1
                     && context.getStackSize() >= innerElementLevelThreshold) {
-                    throw new DepthExceededStaxException("reach the innerElementLevelThreshold:" 
+                    throw new DepthExceededStaxException("reach the innerElementLevelThreshold:"
                                                + innerElementLevelThreshold);
                 }
-                if (context.isThreshold() && innerElementCountThreshold != -1 
+                if (context.isThreshold() && innerElementCountThreshold != -1
                     && context.getCount() >= innerElementCountThreshold) {
-                    throw new DepthExceededStaxException("reach the innerElementCountThreshold:" 
+                    throw new DepthExceededStaxException("reach the innerElementCountThreshold:"
                                                + innerElementCountThreshold);
                 }
                 parent = e;
@@ -1499,7 +1499,7 @@ public final class StaxUtils {
                 break;
             case XMLStreamConstants.CHARACTERS:
                 if (parent != null) {
-                    context.setRecordLoc(addLocation(doc, 
+                    context.setRecordLoc(addLocation(doc,
                                                      parent.appendChild(doc.createTextNode(reader.getText())),
                                                      reader.getLocation(), context.isRecordLoc()));
                 }
@@ -1510,7 +1510,7 @@ public final class StaxUtils {
                 }
                 break;
             case XMLStreamConstants.CDATA:
-                context.setRecordLoc(addLocation(doc, 
+                context.setRecordLoc(addLocation(doc,
                                         parent.appendChild(doc.createCDATASection(reader.getText())),
                                         reader.getLocation(), context.isRecordLoc()));
                 break;
@@ -1529,7 +1529,7 @@ public final class StaxUtils {
             }
         }
     }
-    
+
     public static Node readDocElement(Document doc, Node parent, XMLEvent ev, StreamToDOMContext context)
         throws XMLStreamException {
         switch (ev.getEventType()) {
@@ -1539,7 +1539,7 @@ public final class StaxUtils {
             StartElement startElem = ev.asStartElement();
             QName name = startElem.getName();
             if (!StringUtils.isEmpty(name.getPrefix())) {
-                e = doc.createElementNS(name.getNamespaceURI(), 
+                e = doc.createElementNS(name.getNamespaceURI(),
                                         name.getPrefix() + ":" + name.getLocalPart());
             } else {
                 e = doc.createElementNS(name.getNamespaceURI(), name.getLocalPart());
@@ -1553,14 +1553,14 @@ public final class StaxUtils {
                 declare(e, name.getNamespaceURI(), name.getPrefix());
             }
             context.pushToStack(parent);
-            if (context.isThreshold() && innerElementLevelThreshold != -1 
+            if (context.isThreshold() && innerElementLevelThreshold != -1
                 && context.getStackSize() >= innerElementLevelThreshold) {
-                throw new DepthExceededStaxException("reach the innerElementLevelThreshold:" 
+                throw new DepthExceededStaxException("reach the innerElementLevelThreshold:"
                                            + innerElementLevelThreshold);
             }
-            if (context.isThreshold() && innerElementCountThreshold != -1 
+            if (context.isThreshold() && innerElementCountThreshold != -1
                 && context.getCount() >= innerElementCountThreshold) {
-                throw new DepthExceededStaxException("reach the innerElementCountThreshold:" 
+                throw new DepthExceededStaxException("reach the innerElementCountThreshold:"
                                            + innerElementCountThreshold);
             }
             parent = e;
@@ -1594,7 +1594,7 @@ public final class StaxUtils {
         case XMLStreamConstants.CHARACTERS:
             if (parent != null) {
                 Characters characters = ev.asCharacters();
-                context.setRecordLoc(addLocation(doc, 
+                context.setRecordLoc(addLocation(doc,
                                                  parent.appendChild(doc.createTextNode(characters.getData())),
                                                  characters.getLocation(), context.isRecordLoc()));
             }
@@ -1606,7 +1606,7 @@ public final class StaxUtils {
             break;
         case XMLStreamConstants.CDATA:
             Characters characters = ev.asCharacters();
-            context.setRecordLoc(addLocation(doc, 
+            context.setRecordLoc(addLocation(doc,
                                              parent.appendChild(doc.createCDATASection(characters.getData())),
                                              characters.getLocation(), context.isRecordLoc()));
             break;
@@ -1623,8 +1623,8 @@ public final class StaxUtils {
         }
         return parent;
     }
-    
-    private static boolean addLocation(Document doc, Node node, 
+
+    private static boolean addLocation(Document doc, Node node,
                                        Location loc,
                                        boolean recordLoc) {
         if (recordLoc && loc != null && (loc.getColumnNumber() != 0 || loc.getLineNumber() != 0)) {
@@ -1659,16 +1659,16 @@ public final class StaxUtils {
         }
         return recordLoc;
     }
-    
-    private static boolean addLocation(Document doc, Node node, 
+
+    private static boolean addLocation(Document doc, Node node,
                                     XMLStreamReader reader,
                                     boolean recordLoc) {
         return addLocation(doc, node, reader.getLocation(), recordLoc);
     }
-    
+
     private static class LocationUserDataHandler implements UserDataHandler {
         public static final LocationUserDataHandler INSTANCE = new LocationUserDataHandler();
-        
+
         public void handle(short operation, String key, Object data, Node src, Node dst) {
             if (operation == NODE_CLONED) {
                 dst.setUserData(key, data, this);
@@ -1755,7 +1755,7 @@ public final class StaxUtils {
             returnXMLInputFactory(factory);
         }
     }
-    
+
     public static XMLStreamReader createXMLStreamReader(Element el) {
         return new W3CDOMStreamReader(el);
     }
@@ -1768,7 +1768,7 @@ public final class StaxUtils {
     public static XMLStreamReader createXMLStreamReader(Document doc, String sysId) {
         return new W3CDOMStreamReader(doc.getDocumentElement(), sysId);
     }
-    
+
     public static XMLStreamReader createXMLStreamReader(Source source) {
         try {
             if (source instanceof DOMSource) {
@@ -1780,7 +1780,7 @@ public final class StaxUtils {
                 } else if (nd instanceof Element) {
                     el = (Element)nd;
                 }
-                
+
                 if (null != el) {
                     return new W3CDOMStreamReader(el, source.getSystemId());
                 }
@@ -1794,11 +1794,11 @@ public final class StaxUtils {
                     return createXMLStreamReader(((SAXSource)source).getInputSource());
                 }
             }
-            
+
             XMLInputFactory factory = getXMLInputFactory();
             try {
                 XMLStreamReader reader = null;
-            
+
                 try {
                     reader = factory.createXMLStreamReader(source);
                 } catch (UnsupportedOperationException e) {
@@ -1848,7 +1848,7 @@ public final class StaxUtils {
             return null;
         }
         value = value.trim();
-        
+
         int index = value.indexOf(":");
 
         if (index == -1) {
@@ -1866,13 +1866,13 @@ public final class StaxUtils {
         if (ns == null) {
             return new QName(localName);
         }
-        
+
         return new QName(ns, localName, prefix);
     }
-    
+
     /**
      * Create a unique namespace uri/prefix combination.
-     * 
+     *
      * @return The namespace with the specified URI. If one doesn't exist, one
      *         is created.
      * @throws XMLStreamException
@@ -1916,7 +1916,7 @@ public final class StaxUtils {
             n++;
         }
     }
-    
+
 
     public static void printXmlFragment(XMLStreamReader reader) {
         try {
@@ -1928,22 +1928,22 @@ public final class StaxUtils {
                 writer.flush();
             } finally {
                 StaxUtils.close(writer);
-            }        
+            }
             LOG.info(sw.toString());
         } catch (XMLStreamException e) {
             LOG.severe(e.getMessage());
         }
     }
-    
-    
-    private static void writeStartElementEvent(XMLEvent event, XMLStreamWriter writer) 
+
+
+    private static void writeStartElementEvent(XMLEvent event, XMLStreamWriter writer)
         throws XMLStreamException {
         StartElement start = event.asStartElement();
         QName name = start.getName();
         String nsURI = name.getNamespaceURI();
         String localName = name.getLocalPart();
         String prefix = name.getPrefix();
-        
+
         if (prefix != null) {
             writer.writeStartElement(prefix, localName, nsURI);
         } else if (nsURI != null) {
@@ -1955,15 +1955,15 @@ public final class StaxUtils {
         while (it != null && it.hasNext()) {
             writeEvent(it.next(), writer);
         }
-        
+
         it = CastUtils.cast(start.getAttributes());
         while (it != null && it.hasNext()) {
-            writeAttributeEvent(it.next(), writer);            
+            writeAttributeEvent(it.next(), writer);
         }
     }
-    private static void writeAttributeEvent(XMLEvent event, XMLStreamWriter writer) 
+    private static void writeAttributeEvent(XMLEvent event, XMLStreamWriter writer)
         throws XMLStreamException {
-        
+
         Attribute attr = (Attribute)event;
         QName name = attr.getName();
         String nsURI = name.getNamespaceURI();
@@ -1990,7 +1990,7 @@ public final class StaxUtils {
         case XMLEvent.END_ELEMENT:
             writer.writeEndElement();
             break;
-        case XMLEvent.ATTRIBUTE: 
+        case XMLEvent.ATTRIBUTE:
             writeAttributeEvent(event, writer);
             break;
         case XMLEvent.ENTITY_REFERENCE:
@@ -2002,7 +2002,7 @@ public final class StaxUtils {
         case XMLEvent.PROCESSING_INSTRUCTION:
             if (((javax.xml.stream.events.ProcessingInstruction)event).getData() != null) {
                 writer.writeProcessingInstruction(
-                    ((javax.xml.stream.events.ProcessingInstruction)event).getTarget(), 
+                    ((javax.xml.stream.events.ProcessingInstruction)event).getTarget(),
                     ((javax.xml.stream.events.ProcessingInstruction)event).getData());
             } else {
                 writer.writeProcessingInstruction(
@@ -2017,7 +2017,7 @@ public final class StaxUtils {
                 writer.writeNamespace(((Namespace)event).getPrefix(),
                                       ((Namespace)event).getNamespaceURI());
                 writer.setPrefix(((Namespace)event).getPrefix(),
-                                 ((Namespace)event).getNamespaceURI()); 
+                                 ((Namespace)event).getNamespaceURI());
             }
             break;
         case XMLEvent.COMMENT:
@@ -2107,15 +2107,15 @@ public final class StaxUtils {
             throw new RuntimeException(e);
         } finally {
             StaxUtils.close(writer);
-        }        
-        return sw.toString();        
+        }
+        return sw.toString();
     }
     public static void close(XMLStreamReader reader) throws XMLStreamException {
         if (reader != null) {
             reader.close();
         }
     }
-    
+
     public static void close(XMLStreamWriter writer) {
         if (writer != null) {
             try {
@@ -2125,7 +2125,7 @@ public final class StaxUtils {
             }
         }
     }
-    
+
     public static boolean isSecureReader(XMLStreamReader reader, Message message) {
         if (reader instanceof DocumentDepthProperties) {
             return true;
@@ -2139,29 +2139,29 @@ public final class StaxUtils {
         }
         return false;
     }
-    
+
     public static XMLStreamReader configureReader(XMLStreamReader xreader, Message message) throws XMLStreamException {
         Integer messageMaxChildElements = PropertyUtils.getInteger(message, MAX_CHILD_ELEMENTS);
         Integer messageMaxElementDepth = PropertyUtils.getInteger(message, MAX_ELEMENT_DEPTH);
-        Integer messageMaxAttributeCount = PropertyUtils.getInteger(message, MAX_ATTRIBUTE_COUNT); 
+        Integer messageMaxAttributeCount = PropertyUtils.getInteger(message, MAX_ATTRIBUTE_COUNT);
         Integer messageMaxAttributeSize = PropertyUtils.getInteger(message, MAX_ATTRIBUTE_SIZE);
-        Integer messageMaxTextLength = PropertyUtils.getInteger(message, MAX_TEXT_LENGTH); 
+        Integer messageMaxTextLength = PropertyUtils.getInteger(message, MAX_TEXT_LENGTH);
         Long messageMaxElementCount = PropertyUtils.getLong(message, MAX_ELEMENT_COUNT);
         Long messageMaxXMLCharacters = PropertyUtils.getLong(message, MAX_XML_CHARACTERS);
         return configureReader(xreader, messageMaxChildElements, messageMaxElementDepth,
                                messageMaxAttributeCount, messageMaxAttributeSize, messageMaxTextLength,
                                messageMaxElementCount, messageMaxXMLCharacters);
     }
-        
+
     //CHECKSTYLE:OFF - lots of params to configure
     public static XMLStreamReader configureReader(XMLStreamReader reader, Integer maxChildElements,
                                        Integer maxElementDepth, Integer maxAttributeCount,
                                        Integer maxAttributeSize, Integer maxTextLength,
-                                       Long maxElementCount, Long maxXMLCharacters) 
+                                       Long maxElementCount, Long maxXMLCharacters)
         throws XMLStreamException {
         //CHECKSTYLE:ON
-        
-        // We currently ONLY support Woodstox 4.2.x for most of this other than a few things 
+
+        // We currently ONLY support Woodstox 4.2.x for most of this other than a few things
         // that we can handle via a wrapper.
         try {
             DocumentDepthProperties p = null;
@@ -2181,7 +2181,7 @@ public final class StaxUtils {
                     //we can handle this via a wrapper
                     if (p == null) {
                         p = new DocumentDepthProperties();
-                    } 
+                    }
                     p.setInnerElementLevelThreshold(maxElementDepth);
                 }
             }
@@ -2201,7 +2201,7 @@ public final class StaxUtils {
                     //we can handle this via a wrapper
                     if (p == null) {
                         p = new DocumentDepthProperties();
-                    } 
+                    }
                     p.setElementCountThreshold(maxElementCount.intValue());
                 }
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java b/core/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
index 22266b3..667d4d2 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
@@ -34,14 +34,14 @@ import org.xml.sax.ext.LexicalHandler;
 import org.apache.cxf.common.util.StringUtils;
 
 /**
- * 
+ *
  */
 public class StreamWriterContentHandler implements ContentHandler, LexicalHandler {
-    
+
     XMLStreamWriter writer;
     Map<String, String> mapping = new LinkedHashMap<String, String>();
     boolean inCDATA;
-    
+
     public StreamWriterContentHandler(XMLStreamWriter w) {
         writer = w;
     }
@@ -61,7 +61,7 @@ public class StreamWriterContentHandler implements ContentHandler, LexicalHandle
      * @throws SAXException
      */
     public void startDocument() throws SAXException {
-        // 
+        //
     }
 
     /**
@@ -174,7 +174,7 @@ public class StreamWriterContentHandler implements ContentHandler, LexicalHandle
 
     /**
      * Method getPrefix.
-     * @param namespaceURI 
+     * @param namespaceURI
      *
      * @param qname
      * @return Returns String.
@@ -207,7 +207,7 @@ public class StreamWriterContentHandler implements ContentHandler, LexicalHandle
                              Attributes atts) throws SAXException {
         try {
             String prefix = getPrefix(qName, namespaceURI);
-            
+
             // it is only the prefix we want to learn from the QName! so we can get rid of the
             // spliting QName
             if (prefix == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
index f3eb87c..49d8c01 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
@@ -44,7 +44,7 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
     private Document document;
 
     private W3CNamespaceContext context;
-    
+
     private String sysId;
 
     /**
@@ -54,7 +54,7 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
         super(new ElementFrame<Node, Node>(element, null));
         content = element;
         newFrame(getCurrentFrame());
-                
+
         this.document = element.getOwnerDocument();
     }
     public W3CDOMStreamReader(Element element, String systemId) {
@@ -155,14 +155,14 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
 
     @Override
     protected ElementFrame<Node, Node> getChildFrame() {
-        return new ElementFrame<Node, Node>(getCurrentFrame().currentChild, 
+        return new ElementFrame<Node, Node>(getCurrentFrame().currentChild,
                                 getCurrentFrame());
     }
 
     @Override
     protected boolean hasMoreChildren() {
         if (getCurrentFrame().currentChild == null) {
-            return getCurrentNode().getFirstChild() != null;            
+            return getCurrentNode().getFirstChild() != null;
         }
         return getCurrentFrame().currentChild.getNextSibling() != null;
     }
@@ -171,11 +171,11 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
     protected int nextChild() {
         ElementFrame<Node, Node> frame = getCurrentFrame();
         if (frame.currentChild == null) {
-            content = getCurrentNode().getFirstChild();            
+            content = getCurrentNode().getFirstChild();
         } else {
             content = frame.currentChild.getNextSibling();
         }
-        
+
         frame.currentChild = content;
         switch (content.getNodeType()) {
         case Node.ELEMENT_NODE:
@@ -296,7 +296,7 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
             //DOM level 2?
             schemaType = null;
         }
-        return (schemaType == null) ? "CDATA" 
+        return (schemaType == null) ? "CDATA"
             : schemaType.getTypeName() == null ? "CDATA" : schemaType.getTypeName();
     }
 
@@ -403,11 +403,11 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
 
     public String getPIData() {
         throw new UnsupportedOperationException();
-    }   
+    }
     public Location getLocation() {
         try {
             Object o = getCurrentNode().getUserData("location");
-            if (o instanceof Location) { 
+            if (o instanceof Location) {
                 return (Location)o;
             }
         } catch (Throwable ex) {
@@ -415,7 +415,7 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
         }
         return super.getLocation();
     }
-    
+
     public String toString() {
         if (document == null) {
             return "<null>";
@@ -431,5 +431,5 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> {
         }
     }
 
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
index 353da70..ae40f6e 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
@@ -67,7 +67,7 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
 
     public W3CDOMStreamWriter(Element e) {
         this.document = e.getOwnerDocument();
-        
+
         currentNode = e;
         ((W3CNamespaceContext)context).setElement(e);
     }
@@ -76,7 +76,7 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
         currentNode = e;
         ((W3CNamespaceContext)context).setElement(e);
     }
-    
+
     public Element getCurrentNode() {
         if (currentNode instanceof Element) {
             return (Element)currentNode;
@@ -89,7 +89,7 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
         }
         return null;
     }
-    
+
     public void setNsRepairing(boolean b) {
         nsRepairing = b;
     }
@@ -147,14 +147,14 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
             }
         }
     }
-    
+
     protected Element createElementNS(String ns, String pfx, String local) {
         if (pfx != null) {
             local = pfx + ":" + local;
         }
         return document.createElementNS(ns, local);
     }
-    
+
     protected void createAndAddElement(String prefix, String local, String namespace) {
         if (prefix == null) {
             if (namespace == null) {
@@ -214,7 +214,7 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
         if (prefix.length() > 0) {
             local = prefix + ":" + local;
         }
-        
+
         Attr a = document.createAttributeNS(namespace, local);
         a.setValue(value);
         ((Element)currentNode).setAttributeNodeNS(a);
@@ -340,7 +340,7 @@ public class W3CDOMStreamWriter implements XMLStreamWriter {
 
     public void flush() throws XMLStreamException {
     }
-    
+
     public String toString() {
         if (document == null) {
             return "<null>";

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/W3CNamespaceContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/W3CNamespaceContext.java b/core/src/main/java/org/apache/cxf/staxutils/W3CNamespaceContext.java
index fe52c8f..634f409 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/W3CNamespaceContext.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/W3CNamespaceContext.java
@@ -33,17 +33,17 @@ import org.w3c.dom.Node;
 public class W3CNamespaceContext implements NamespaceContext {
     private Element currentNode;
     private NamespaceContext outNamespaceContext;
-    
+
     public W3CNamespaceContext() {
     }
     public W3CNamespaceContext(Element el) {
         currentNode = el;
     }
-    
+
     public void setOutNamespaceContext(NamespaceContext context) {
         outNamespaceContext = context;
     }
-    
+
     public String getNamespaceURI(String prefix) {
         String name = prefix;
         if (name.length() == 0) {
@@ -51,7 +51,7 @@ public class W3CNamespaceContext implements NamespaceContext {
         } else {
             name = "xmlns:" + prefix;
         }
-        
+
         return getNamespaceURI(currentNode, name);
     }
 
@@ -66,7 +66,7 @@ public class W3CNamespaceContext implements NamespaceContext {
                 return result;
             }
         }
-        
+
         Attr attr = e.getAttributeNode(name);
         if (attr == null) {
             Node n = e.getParentNode();
@@ -95,7 +95,7 @@ public class W3CNamespaceContext implements NamespaceContext {
                 return result;
             }
         }
-        
+
         NamedNodeMap attributes = e.getAttributes();
         if (attributes != null) {
             for (int i = 0; i < attributes.getLength(); i++) {
@@ -128,7 +128,7 @@ public class W3CNamespaceContext implements NamespaceContext {
         if (prefix != null) {
             prefixes.add(prefix);
         }
-        
+
         return prefixes.iterator();
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/WoodstoxHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/WoodstoxHelper.java b/core/src/main/java/org/apache/cxf/staxutils/WoodstoxHelper.java
index 8b901bc..b389589 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/WoodstoxHelper.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/WoodstoxHelper.java
@@ -28,17 +28,17 @@ import com.ctc.wstx.stax.WstxInputFactory;
 import org.codehaus.stax2.XMLStreamReader2;
 
 /**
- * 
+ *
  */
 final class WoodstoxHelper {
 
     private WoodstoxHelper() {
     }
-    
+
     public static XMLInputFactory createInputFactory() {
         return new WstxInputFactory();
     }
-    
+
     public static XMLEventFactory createEventFactory() {
         return new WstxEventFactory();
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java b/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
index ea0f307..50e34e7 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
@@ -22,9 +22,9 @@ import javax.xml.stream.XMLStreamReader;
 
 /**
  * Interface for XMLStreamReader wrappers
- * 
+ *
  */
 public interface XMLStreamReaderWrapper {
-    
+
     XMLStreamReader wrap(XMLStreamReader reader);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java b/core/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
index c97a619..2ef9d12 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
@@ -40,7 +40,7 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         namespaces = new LinkedList<Map<String, String>>();
         prefixes = new LinkedList<Map<String, String>>();
     }
-    
+
     public void down() {
         namespaces.addFirst(new HashMap<String, String>(8));
         prefixes.addFirst(new HashMap<String, String>(8));
@@ -50,14 +50,14 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         namespaces.removeFirst();
         prefixes.removeFirst();
     }
-    
+
     public void addPrefix(String prefix, String ns) {
         if (!namespaces.isEmpty()) {
             namespaces.getFirst().put(prefix, ns);
             prefixes.getFirst().put(ns, prefix);
         }
     }
-    
+
     public String findUniquePrefix(String ns) {
         if (ns.length() == 0) {
             return null;
@@ -66,7 +66,7 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         if (existingPrefix != null) {
             return existingPrefix;
         }
-        
+
         int i = 0;
         while (true) {
             String prefix = "ps" + ++i;
@@ -76,7 +76,7 @@ public class DelegatingNamespaceContext implements NamespaceContext {
             }
         }
     }
-    
+
     public String getNamespaceURI(String prefix) {
         if (!namespaces.isEmpty()) {
             Map<String, String> cache = namespaces.getFirst();
@@ -113,7 +113,7 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         if (value != null) {
             ns = value;
         }
-        
+
         if (!prefixes.isEmpty()) {
             Map<String, String> cache = prefixes.getFirst();
             for (Map<String, String> pfs : prefixes) {
@@ -131,7 +131,7 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         } else if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(ns)) {
             return XMLConstants.XMLNS_ATTRIBUTE;
         }
-        
+
         String prefix = nc.getPrefix(ns);
         if (prefix != null) {
             addPrefix(prefix, ns);
@@ -150,5 +150,5 @@ public class DelegatingNamespaceContext implements NamespaceContext {
         }
         return pl.iterator();
     }
-    
+
 }


Mime
View raw message