* Remove obsolete circumvention of TransientNode.getID().
This commit is contained in:
parent
43f0ea2da1
commit
13365e16df
1 changed files with 2 additions and 16 deletions
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue