aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo/restapi/PathTest.java
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-04-08 17:27:39 +0200
committerjonmv <venstad@gmail.com>2022-04-08 17:27:39 +0200
commit0ee94a18e5420f7f77aec110c8ff0a67a661a7ef (patch)
treed1592c6ed5f01ad1c820c403b8a9590373944b66 /container-core/src/test/java/com/yahoo/restapi/PathTest.java
parent4ffc54339186574491a32b3166223c3fc50ba8fe (diff)
Revert "Merge pull request #22065 from vespa-engine/revert-22049-jonmv/unify-hostname-classes"
This reverts commit 4ffc54339186574491a32b3166223c3fc50ba8fe, reversing changes made to db9e570a36decb24e6cb13f44bd0ff444ab762e3.
Diffstat (limited to 'container-core/src/test/java/com/yahoo/restapi/PathTest.java')
-rw-r--r--container-core/src/test/java/com/yahoo/restapi/PathTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/container-core/src/test/java/com/yahoo/restapi/PathTest.java b/container-core/src/test/java/com/yahoo/restapi/PathTest.java
index 17b35a6343c..b0392c16e2e 100644
--- a/container-core/src/test/java/com/yahoo/restapi/PathTest.java
+++ b/container-core/src/test/java/com/yahoo/restapi/PathTest.java
@@ -68,9 +68,9 @@ public class PathTest {
public void testUrlEncodedPath() {
assertTrue(new Path(URI.create("/a/%62/c")).matches("/a/b/c"));
assertFalse(new Path(URI.create("/a/b%2fc"), __ -> { }).matches("/a/b/c"));
- assertThrows("path segments cannot be \"\", \".\", or \"..\", but got: '..'",
- IllegalArgumentException.class,
- () -> new Path(URI.create("/foo")).matches("/foo/bar/%2e%2e"));
+ assertEquals("path segments cannot be \"\", \".\", or \"..\", but got: '..'",
+ assertThrows(IllegalArgumentException.class,
+ () -> new Path(URI.create("/foo")).matches("/foo/bar/%2e%2e")).getMessage());
Path path = new Path(URI.create("/%61/%2f/%63"), __ -> { });
assertTrue(path.matches("/a/{slash}/{c}"));