diff options
Diffstat (limited to 'gnu/xml/transform/SystemPropertyFunction.java')
-rw-r--r-- | gnu/xml/transform/SystemPropertyFunction.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gnu/xml/transform/SystemPropertyFunction.java b/gnu/xml/transform/SystemPropertyFunction.java index f314227e6..c856a1548 100644 --- a/gnu/xml/transform/SystemPropertyFunction.java +++ b/gnu/xml/transform/SystemPropertyFunction.java @@ -1,5 +1,5 @@ /* SystemPropertyFunction.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2015, 2016 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -57,8 +57,9 @@ final class SystemPropertyFunction implements XPathFunction, Function { - List args; + List<Expr> args; + @SuppressWarnings("rawtypes") public Object evaluate(List args) throws XPathFunctionException { @@ -66,7 +67,7 @@ final class SystemPropertyFunction return systemProperty(QName.valueOf(name)); } - public void setArguments(List args) + public void setArguments(List<Expr> args) { this.args = args; } @@ -74,10 +75,10 @@ final class SystemPropertyFunction public Object evaluate(Node context, int pos, int len) { int arity = args.size(); - List values = new ArrayList(arity); + List<Object> values = new ArrayList<Object>(arity); for (int i = 0; i < arity; i++) { - Expr arg = (Expr) args.get(i); + Expr arg = args.get(i); values.add(arg.evaluate(context, pos, len)); } String name = _string(context, values.get(0)); @@ -116,10 +117,10 @@ final class SystemPropertyFunction { SystemPropertyFunction f = new SystemPropertyFunction(); int len = args.size(); - List args2 = new ArrayList(len); + List<Expr> args2 = new ArrayList<Expr>(len); for (int i = 0; i < len; i++) { - args2.add(((Expr) args.get(i)).clone(context)); + args2.add(args.get(i).clone(context)); } f.setArguments(args2); return f; @@ -127,9 +128,9 @@ final class SystemPropertyFunction public boolean references(QName var) { - for (Iterator i = args.iterator(); i.hasNext(); ) + for (Iterator<Expr> i = args.iterator(); i.hasNext(); ) { - if (((Expr) i.next()).references(var)) + if (i.next().references(var)) { return true; } |