* Remove obsolete circumvention of TransientNode.getID().

This commit is contained in:
hns 2007-05-11 13:26:50 +00:00
parent 43f0ea2da1
commit 13365e16df

View file

@ -422,7 +422,7 @@ public class XmlWriter extends OutputStreamWriter implements XmlConstants {
write("<"); write("<");
write((name == null) ? "hopobject" : name); write((name == null) ? "hopobject" : name);
write(" id=\""); write(" id=\"");
write(getNodeIdentifier(node)); write(node.getID());
if (propName != null) { if (propName != null) {
write("\" propertyname=\""); write("\" propertyname=\"");
@ -466,7 +466,7 @@ public class XmlWriter extends OutputStreamWriter implements XmlConstants {
write("<"); write("<");
write((name == null) ? "hopobject" : name); write((name == null) ? "hopobject" : name);
write(" idref=\""); write(" idref=\"");
write(getNodeIdentifier(node)); write(node.getID());
if (propName != null) { if (propName != null) {
write("\" propertyname=\""); write("\" propertyname=\"");
@ -490,20 +490,6 @@ public class XmlWriter extends OutputStreamWriter implements XmlConstants {
} }
} }
/**
* TransientNode produces a different ID each time we call the getID()-method
* this is a workaround and uses hashCode if INode stands for a TransientNode.
*/
private String getNodeIdentifier(INode node) {
try {
TransientNode tmp = (TransientNode) node;
return Integer.toString(tmp.hashCode());
} catch (ClassCastException e) {
return node.getID();
}
}
/** /**
* *
* *