summaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/xml/xpath/TranslateFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/xml/xpath/TranslateFunction.java')
-rw-r--r--libjava/classpath/gnu/xml/xpath/TranslateFunction.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/libjava/classpath/gnu/xml/xpath/TranslateFunction.java b/libjava/classpath/gnu/xml/xpath/TranslateFunction.java
index 54e8b9c37f5..8b4b8b2338c 100644
--- a/libjava/classpath/gnu/xml/xpath/TranslateFunction.java
+++ b/libjava/classpath/gnu/xml/xpath/TranslateFunction.java
@@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.xml.xpath;
+import gnu.java.lang.CPStringBuilder;
+
import java.util.List;
import javax.xml.namespace.QName;
import org.w3c.dom.Node;
@@ -66,9 +68,9 @@ final class TranslateFunction
final Expr arg2;
final Expr arg3;
- TranslateFunction(List args)
+ TranslateFunction(List<Expr> args)
{
- this((Expr) args.get(0), (Expr) args.get(1), (Expr) args.get(2));
+ this(args.get(0), args.get(1), args.get(2));
}
TranslateFunction(Expr arg1, Expr arg2, Expr arg3)
@@ -86,7 +88,7 @@ final class TranslateFunction
String string = _string(context, val1);
String search = _string(context, val2);
String replace = _string(context, val3);
- StringBuffer buf = new StringBuffer();
+ CPStringBuilder buf = new CPStringBuilder();
int l1 = string.length();
int l2 = search.length();
int l3 = replace.length();
@@ -110,7 +112,7 @@ final class TranslateFunction
buf.append(c);
}
}
- return new String(buf);
+ return buf.toString();
}
public Expr clone(Object context)