diff options
| author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-22 21:21:08 +0000 |
|---|---|---|
| committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-06-22 21:21:08 +0000 |
| commit | f45d5a527fc7518f35bfbff62eda4efd360b1e88 (patch) | |
| tree | 0879d20b4671d8920e788b75db56705fc4328a27 /gnu/xml/xpath/Root.java | |
| parent | 07d83e4a68a79ed4336475f9334222fc9f254668 (diff) | |
| download | classpath-f45d5a527fc7518f35bfbff62eda4efd360b1e88.tar.gz | |
More generification fixes.
2008-06-22 Andrew John Hughes <gnu_andrew@member.fsf.org>
* gnu/xml/xpath/Expr.java,
* gnu/xml/xpath/FloorFunction.java,
* gnu/xml/xpath/Function.java,
* gnu/xml/xpath/FunctionCall.java,
* gnu/xml/xpath/NamespaceUriFunction.java,
* gnu/xml/xpath/ParenthesizedExpr.java,
* gnu/xml/xpath/Root.java,
* gnu/xml/xpath/Selector.java,
* gnu/xml/xpath/Steps.java:
Genericised.
Diffstat (limited to 'gnu/xml/xpath/Root.java')
| -rw-r--r-- | gnu/xml/xpath/Root.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/xml/xpath/Root.java b/gnu/xml/xpath/Root.java index 1f79b3958..cbcb24999 100644 --- a/gnu/xml/xpath/Root.java +++ b/gnu/xml/xpath/Root.java @@ -39,6 +39,8 @@ package gnu.xml.xpath; import java.util.Collection; import java.util.Collections; +import java.util.Set; + import javax.xml.namespace.QName; import org.w3c.dom.Document; import org.w3c.dom.Node; @@ -59,12 +61,14 @@ public final class Root public Object evaluate(Node context, int pos, int len) { - return evaluate(context, Collections.EMPTY_SET); + Set<Node> emptySet = Collections.emptySet(); + return evaluate(context, emptySet); } - Collection evaluate(Node context, Collection ns) + @Override + Collection<Node> evaluate(Node context, Collection<Node> ns) { - Document doc = (context instanceof Document) ? (Document) context : + Node doc = (context instanceof Document) ? context : context.getOwnerDocument(); return Collections.singleton(doc); } |
