MockMvcResultMatchers.forwardedUrl argument declared as nullable

Issue: SPR-17623
This commit is contained in:
Juergen Hoeller 2018-12-25 13:20:09 +01:00
parent ca9c34710f
commit 7a7958f275
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import javax.xml.xpath.XPathExpressionException;
import org.hamcrest.Matcher;
import org.springframework.lang.Nullable;
import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.util.AntPathMatcher;
import org.springframework.web.util.UriComponentsBuilder;
@ -85,7 +86,7 @@ public abstract class MockMvcResultMatchers {
* <p>This method accepts only exact matches.
* @param expectedUrl the exact URL expected
*/
public static ResultMatcher forwardedUrl(String expectedUrl) {
public static ResultMatcher forwardedUrl(@Nullable String expectedUrl) {
return result -> assertEquals("Forwarded URL", expectedUrl, result.getResponse().getForwardedUrl());
}