Author: vhalbert(a)redhat.com
Date: 2010-02-16 14:06:05 -0500 (Tue, 16 Feb 2010)
New Revision: 1831
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/XMLQueryVisitationStrategy.java
Log:
Teiid-773 - fixed a problem that started in JDK 1.5 where 0X0 (null) are no longer valid
chars in JDOM. It was noted that this was not a bug.
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/XMLQueryVisitationStrategy.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/XMLQueryVisitationStrategy.java 2010-02-16
17:04:40 UTC (rev 1830)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/XMLQueryVisitationStrategy.java 2010-02-16
19:06:05 UTC (rev 1831)
@@ -1289,11 +1289,20 @@
// Create the Character element ...
// ----------------------
Element charElement = new Element(TagNames.Elements.CHAR);
- charElement.setText(object.toString());
+
+ String v = object.toString();
+ if (v != null && v.length() != 0) {
+
+ String toReplace = new String( new Character( (char)0x0).toString() );
+ v.replaceAll(toReplace," ");
+ charElement.setText(v.trim());
+
+ }
if ( parent != null ) {
charElement = parent.addContent(charElement);
}
+
return charElement;
}
Show replies by date