diff --git a/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java b/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java index 72bfbeed5a..a14fe6c388 100644 --- a/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java +++ b/org.springframework.core/src/test/java/org/springframework/util/AntPathMatcherTests.java @@ -351,7 +351,14 @@ public class AntPathMatcherTests { assertEquals("/hotels/*/booking/{booking}", pathMatcher.combine("/hotels/*/booking", "{booking}")); assertEquals("/hotel.html", pathMatcher.combine("/*.html", "/hotel.html")); try { - assertEquals("/hotel.html", pathMatcher.combine("/*.html", "/hotel")); + pathMatcher.combine("/*.html", "/hotel"); + fail("IllegalArgumentException expected"); + } + catch (IllegalArgumentException ex) { + // expected + } + try { + pathMatcher.combine("/*.html", "/*.txt"); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException ex) {