diff options
Diffstat (limited to 'libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java')
-rw-r--r-- | libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java b/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java index c7d7de9f7c7..605749d09d7 100644 --- a/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java +++ b/libjava/classpath/gnu/xml/xpath/DocumentOrderComparator.java @@ -46,18 +46,12 @@ import org.w3c.dom.Node; * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public class DocumentOrderComparator - implements Comparator + implements Comparator<Node> { - public int compare(Object o1, Object o2) + public int compare(Node n1, Node n2) { - if (o1 instanceof Node && o2 instanceof Node) - { - Node n1 = (Node)o1; - Node n2 = (Node)o2; - return (int) n1.compareDocumentPosition(n2); - } - return 0; + return (int) n1.compareDocumentPosition(n2); } } |