You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/08/07 05:00:02 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/stree StreeDOMHelper.java
sboag 00/08/06 20:00:02
Modified: java/src/org/apache/xalan/stree StreeDOMHelper.java
Log:
Check for ClassCastExceptions, and delegate to superclass if they occur.
Revision Changes Path
1.4 +25 -4 xml-xalan/java/src/org/apache/xalan/stree/StreeDOMHelper.java
Index: StreeDOMHelper.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/StreeDOMHelper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- StreeDOMHelper.java 2000/08/01 18:22:53 1.3
+++ StreeDOMHelper.java 2000/08/07 03:00:02 1.4
@@ -16,8 +16,15 @@
public String getUniqueID(Node node)
{
- int index = ((Child)node).getUid();
- return "N"+Integer.toHexString(index);
+ try
+ {
+ int index = ((Child)node).getUid();
+ return "N"+Integer.toHexString(index);
+ }
+ catch(ClassCastException cce)
+ {
+ return super.getUniqueID(node);
+ }
}
/**
@@ -53,7 +60,14 @@
*/
public short getLevel(Node node1)
{
- return ((Child)node1).getLevel();
+ try
+ {
+ return ((Child)node1).getLevel();
+ }
+ catch(ClassCastException cce)
+ {
+ return super.getLevel(node1);
+ }
}
/**
@@ -61,7 +75,14 @@
*/
public boolean isNamespaceNode(Node n)
{
- return ((Child)n).isNamespaceNode();
+ try
+ {
+ return ((Child)n).isNamespaceNode();
+ }
+ catch(ClassCastException cce)
+ {
+ return super.isNamespaceNode(n);
+ }
}