openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r693664 - /openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
Date Wed, 10 Sep 2008 00:17:10 GMT
Author: ssegu
Date: Tue Sep  9 17:17:10 2008
New Revision: 693664

URL: http://svn.apache.org/viewvc?rev=693664&view=rev
Log:
OPENJPA-657 Removing DOM 3 level methods in parsing XML

Modified:
    openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java

Modified: openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
URL: http://svn.apache.org/viewvc/openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java?rev=693664&r1=693663&r2=693664&view=diff
==============================================================================
--- openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
(original)
+++ openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLErrorCodeReader.java
Tue Sep  9 17:17:10 2008
@@ -139,8 +139,9 @@
 			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 (int k = 0; k < codes.length; k++ ) {



Mime
View raw message