From d6999de0da0797bb628bed785c12e5236795b34a Mon Sep 17 00:00:00 2001 From: Owen Stephens Date: Sun, 21 Jul 2019 13:19:34 +0100 Subject: [PATCH] Match only accepts regular expressions --- main/src/com/google/refine/expr/functions/strings/Match.java | 4 ++-- .../refine/tests/expr/functions/strings/MatchTests.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/expr/functions/strings/Match.java b/main/src/com/google/refine/expr/functions/strings/Match.java index 141948abf..f92225e37 100644 --- a/main/src/com/google/refine/expr/functions/strings/Match.java +++ b/main/src/com/google/refine/expr/functions/strings/Match.java @@ -71,7 +71,7 @@ public class Match implements Function { return null; } - return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a string or a regexp"); + return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a regexp"); } @Override @@ -81,7 +81,7 @@ public class Match implements Function { @Override public String getParams() { - return "string or regexp"; + return "regexp"; } @Override diff --git a/main/tests/server/src/com/google/refine/tests/expr/functions/strings/MatchTests.java b/main/tests/server/src/com/google/refine/tests/expr/functions/strings/MatchTests.java index fde4e80c0..3ca6c773a 100644 --- a/main/tests/server/src/com/google/refine/tests/expr/functions/strings/MatchTests.java +++ b/main/tests/server/src/com/google/refine/tests/expr/functions/strings/MatchTests.java @@ -34,7 +34,7 @@ import com.google.refine.tests.util.TestUtils; public class MatchTests { @Test public void serializeMatch() { - String json = "{\"description\":\"Returns an array of the groups matching the given regular expression\",\"params\":\"string or regexp\",\"returns\":\"array of strings\"}"; + String json = "{\"description\":\"Returns an array of the groups matching the given regular expression\",\"params\":\"regexp\",\"returns\":\"array of strings\"}"; TestUtils.isSerializedTo(new Match(), json); } }