OPENJPA-657 Removing DOM 3 level methods in parsing XML

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@675812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-07-10 23:56:07 +00:00
parent 89e7531398
commit 07919b9bec
1 changed files with 3 additions and 2 deletions

View File

@ -120,8 +120,9 @@ public class SQLErrorCodeReader {
short nodeType = child.getNodeType();
if (nodeType == Node.ELEMENT_NODE) {
String errorType = child.getNodeName();
if (storeErrorTypes.containsKey(errorType)) {
String errorCodes = child.getTextContent();
Node textNode = child.getFirstChild();
if (storeErrorTypes.containsKey(errorType) && textNode != null){
String errorCodes = textNode.getNodeValue();
if (!StringUtils.isEmpty(errorCodes)) {
String[] codes = errorCodes.split(ERROR_CODE_DELIMITER);
for (String code : codes) {