Skip to content

Commit cf86567

Browse files
committed
SWS-335
1 parent be5f187 commit cf86567

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

core/src/main/java/org/springframework/ws/soap/saaj/support/SaajContentHandler.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@
1717
package org.springframework.ws.soap.saaj.support;
1818

1919
import java.util.Iterator;
20+
import java.util.LinkedHashMap;
2021
import java.util.Map;
2122
import javax.xml.soap.Name;
2223
import javax.xml.soap.SOAPElement;
2324
import javax.xml.soap.SOAPEnvelope;
2425
import javax.xml.soap.SOAPException;
2526

26-
import org.springframework.core.CollectionFactory;
27-
import org.springframework.util.Assert;
28-
import org.springframework.util.StringUtils;
2927
import org.xml.sax.Attributes;
3028
import org.xml.sax.ContentHandler;
3129
import org.xml.sax.Locator;
3230
import org.xml.sax.SAXException;
3331

32+
import org.springframework.util.Assert;
33+
import org.springframework.util.StringUtils;
34+
3435
/**
3536
* SAX <code>ContentHandler</code> that transforms callback calls to the creation of SAAJ <code>Node</code>s and
3637
* <code>SOAPElement</code>s.
@@ -46,7 +47,7 @@ public class SaajContentHandler implements ContentHandler {
4647

4748
private final SOAPEnvelope envelope;
4849

49-
private Map namespaces = CollectionFactory.createLinkedMapIfPossible(5);
50+
private Map namespaces = new LinkedHashMap();
5051

5152
/**
5253
* Constructs a new instance of the <code>SaajContentHandler</code> that creates children of the given

core/src/main/java/org/springframework/ws/soap/saaj/support/SaajXmlReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private void handleElement(SOAPElement element) throws SAXException {
168168

169169
private void handleText(Text text) throws SAXException {
170170
if (getContentHandler() != null) {
171-
char[] ch = text.getValue().toCharArray();
171+
char[] ch = text.getValue() != null ? text.getValue().toCharArray() : new char[0];
172172
getContentHandler().characters(ch, 0, ch.length);
173173
}
174174
}

0 commit comments

Comments
 (0)