diff --git a/main/src/com/google/refine/expr/functions/xml/InnerXml.java b/main/src/com/google/refine/expr/functions/xml/InnerXml.java index 3f9860eb7..49e59ab83 100644 --- a/main/src/com/google/refine/expr/functions/xml/InnerXml.java +++ b/main/src/com/google/refine/expr/functions/xml/InnerXml.java @@ -53,9 +53,9 @@ public class InnerXml implements Function { Object o1 = args[0]; if (o1 != null && o1 instanceof Element) { Element e1 = (Element)o1; - if(mode == "xml") { + if(mode.equals("xml")) { return e1.children().toString(); - } else if (mode == "html") { + } else if (mode.equals("html")) { return e1.html(); } else { return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " unable to determine whether XML or HTML is being used."); diff --git a/main/src/com/google/refine/expr/functions/xml/ParseXml.java b/main/src/com/google/refine/expr/functions/xml/ParseXml.java index 3c5239402..047667f1f 100644 --- a/main/src/com/google/refine/expr/functions/xml/ParseXml.java +++ b/main/src/com/google/refine/expr/functions/xml/ParseXml.java @@ -53,9 +53,9 @@ public class ParseXml implements Function { if (args.length == 1) { Object o1 = args[0]; if (o1 != null && o1 instanceof String) { - if (mode == "html") { + if (mode.equals("html")) { return Jsoup.parse(o1.toString()); - } else if (mode == "xml") { + } else if (mode.equals("xml")) { return Jsoup.parse(o1.toString(), "",Parser.xmlParser()); } else { return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " unable to identify which parser to use"); diff --git a/main/tests/server/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperationTests.java b/main/tests/server/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperationTests.java index 0338e57c0..91c91b004 100644 --- a/main/tests/server/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperationTests.java +++ b/main/tests/server/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperationTests.java @@ -179,7 +179,7 @@ public class ColumnAdditionByFetchingURLsOperationTests extends RefineTest { String ref_val = (String)project.rows.get(0).getCellValue(1).toString(); if (ref_val.startsWith("HTTP error")) return; - Assert.assertTrue(ref_val != "apple"); // just to make sure I picked the right column + Assert.assertFalse(ref_val.equals("apple")); // just to make sure I picked the right column for (int i = 1; i < 4; i++) { System.out.println("value:" + project.rows.get(i).getCellValue(1)); // all random values should be equal due to caching