Author: adietish
Date: 2011-01-12 12:55:11 -0500 (Wed, 12 Jan 2011)
New Revision: 28140
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java
Log:
added string-stripping (to remove \n,\t, " ", etc.)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java 2011-01-12
17:48:15 UTC (rev 28139)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java 2011-01-12
17:55:11 UTC (rev 28140)
@@ -28,7 +28,7 @@
/**
* @author André Dietisheim
- *
+ *
* @param <DELTACLOUDOBJECT>
*/
public abstract class AbstractDOMUnmarshaller<DELTACLOUDOBJECT> {
@@ -41,8 +41,7 @@
this.tagName = tagName;
}
- public DELTACLOUDOBJECT unmarshall(InputStream inputStream, DELTACLOUDOBJECT
deltacloudObject)
- throws DeltaCloudClientException {
+ public DELTACLOUDOBJECT unmarshall(InputStream inputStream, DELTACLOUDOBJECT
deltacloudObject) throws DeltaCloudClientException {
try {
Element element = getFirstElement(tagName, getDocument(inputStream));
if (element == null) {
@@ -57,8 +56,7 @@
}
- protected Document getDocument(InputStream inputStream) throws
ParserConfigurationException, SAXException,
- IOException {
+ protected Document getDocument(InputStream inputStream) throws
ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
return documentBuilder.parse(inputStream);
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java 2011-01-12
17:48:15 UTC (rev 28139)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java 2011-01-12
17:55:11 UTC (rev 28140)
@@ -56,7 +56,7 @@
Node addressNode = addressList.item(i);
if (addressNode != null) {
String address = stripText(addressNode.getTextContent());
- if (address != null) {
+ if (address != null && address.length() > 0) {
addresses.add(address);
}
}
Show replies by date