Author: shawkins
Date: 2012-04-30 11:04:19 -0400 (Mon, 30 Apr 2012)
New Revision: 4043
Modified:
branches/8.0.x/client/src/main/java/org/teiid/client/plan/PlanNode.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/BinaryType.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java
Log:
TEIID-2019 removing jaxb reference
Modified: branches/8.0.x/client/src/main/java/org/teiid/client/plan/PlanNode.java
===================================================================
--- branches/8.0.x/client/src/main/java/org/teiid/client/plan/PlanNode.java 2012-04-30
13:56:47 UTC (rev 4042)
+++ branches/8.0.x/client/src/main/java/org/teiid/client/plan/PlanNode.java 2012-04-30
15:04:19 UTC (rev 4043)
@@ -206,7 +206,7 @@
writer.writeEndElement();
}
- private void writeElement(final XMLStreamWriter writer, String name, String value)
throws XMLStreamException {
+ private static void writeElement(final XMLStreamWriter writer, String name, String
value) throws XMLStreamException {
writer.writeStartElement(name);
writer.writeCharacters(value);
writer.writeEndElement();
@@ -258,6 +258,7 @@
Properties nodeProps = getAttributes(reader);
PlanNode childNode = new
PlanNode(nodeProps.getProperty("name"));//$NON-NLS-1$
node.addProperty(props.getProperty("name"), buildNode(reader,
childNode));//$NON-NLS-1$
+ break;
}
else {
throw new XMLStreamException(JDBCPlugin.Util.gs("unexpected_element",
reader.getName(), "value"), reader.getLocation());//$NON-NLS-1$ //$NON-NLS-2$
Modified: branches/8.0.x/common-core/src/main/java/org/teiid/core/types/BinaryType.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/BinaryType.java 2012-04-30
13:56:47 UTC (rev 4042)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/BinaryType.java 2012-04-30
15:04:19 UTC (rev 4043)
@@ -24,9 +24,8 @@
import java.util.Arrays;
-import javax.xml.bind.DatatypeConverter;
-
import org.teiid.core.util.Assertion;
+import org.teiid.core.util.PropertiesUtils;
public final class BinaryType implements Comparable<BinaryType> {
@@ -102,7 +101,7 @@
@Override
public String toString() {
- return DatatypeConverter.printHexBinary(bytes);
+ return PropertiesUtils.toHex(bytes);
}
public BlobType toBlob() {
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java 2012-04-30
13:56:47 UTC (rev 4042)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java 2012-04-30
15:04:19 UTC (rev 4043)
@@ -646,6 +646,14 @@
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
};
+ public static String toHex(byte[] bytes) {
+ StringBuilder sb = new StringBuilder(bytes.length * 2);
+ for (byte b : bytes) {
+ sb.append(toHex(b >>> 4));
+ sb.append(toHex(b));
+ }
+ return sb.toString();
+ }
public static final void copyProperty(Properties srcProperties, String srcPropName,
Properties tgtProperties, String tgtPropName) {
if(srcProperties == null || srcPropName == null || tgtProperties == null ||
tgtPropName == null) {
Show replies by date