Fix NullAway error

Related https://github.com/spring-projects/spring-framework/pull/35629
This commit is contained in:
Joe Grandja 2025-10-15 14:52:55 -04:00
parent 95644fb73c
commit 67c3ceb611
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ public final class FormPostRedirectStrategy implements RedirectStrategy {
// @formatter:off
final String html = REDIRECT_PAGE_TEMPLATE
// Clear the query string as we don't want that to be part of the form action URL
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
// @formatter:on

View File

@ -105,7 +105,7 @@ public final class FormPostServerRedirectStrategy implements ServerRedirectStrat
// @formatter:off
final String html = REDIRECT_PAGE_TEMPLATE
// Clear the query string as we don't want that to be part of the form action URL
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
// @formatter:on