diff --git a/spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java b/spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java index 0fb49b608c5..6fd80b7d442 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java @@ -58,7 +58,7 @@ public class XpathRequestMatchers { * formatting specifiers defined in {@link String#format(String, Object...)} * @throws XPathExpressionException if expression compilation failed */ - XpathRequestMatchers(String expression, @Nullable Map namespaces, Object... args) + protected XpathRequestMatchers(String expression, @Nullable Map namespaces, Object... args) throws XPathExpressionException { this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);