Skip to content

Commit 275a53d

Browse files
committed
ESQL: Add url_decode function (#133494)
1 parent 695cbb7 commit 275a53d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractUrlEncodeDecodeTestCase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.nio.charset.StandardCharsets;
1616
import java.util.ArrayList;
1717
import java.util.List;
18+
import java.util.Locale;
1819
import java.util.function.Supplier;
1920

2021
import static org.hamcrest.Matchers.equalTo;
@@ -88,11 +89,11 @@ public static TestCaseSupplier.TestCase createTestCaseWithRandomString(
8889

8990
private static RandomUrl generateRandomUrl() {
9091
String protocol = randomFrom("http://", "https://", "");
91-
String domain = String.format("%s.com", randomAlphaOfLengthBetween(3, 10));
92+
String domain = String.format(Locale.ROOT, "%s.com", randomAlphaOfLengthBetween(3, 10));
9293
String path = randomFrom("", "/" + randomAlphanumericOfLength(5) + "/");
9394
String query = randomFrom("", "?" + randomAlphaOfLength(5) + "=" + randomAlphanumericOfLength(5));
9495

95-
String plain = String.format("%s%s%s%s", protocol, domain, path, query);
96+
String plain = String.format(Locale.ROOT, "%s%s%s%s", protocol, domain, path, query);
9697
String encoded = encode(plain);
9798

9899
return new RandomUrl(plain, encoded);

0 commit comments

Comments
 (0)