Commit 36cbd008 authored by Andy Wilkinson's avatar Andy Wilkinson

Disable AssertJ's bare-named property accessor discovery

AssertJ includes a change in 3.12 that means that, by default, it now incorrectly
identifies some of the builder methods on CacheControl as accessor methods for its fields.
This commit restores the behaviour of 3.11 so that a method is only considered to be a
property accessor if a matches the Java bean naming conventions.

Closes gh-16145
parent e667911f
......@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
import javax.validation.ValidatorFactory;
import org.assertj.core.api.Assertions;
import org.joda.time.DateTime;
import org.junit.Test;
......@@ -418,6 +419,7 @@ public class WebFluxAutoConfigurationTests {
assertThat(handlerMap).hasSize(2);
for (Object handler : handlerMap.values()) {
if (handler instanceof ResourceWebHandler) {
Assertions.setExtractBareNamePropertyMethods(false);
assertThat(((ResourceWebHandler) handler).getCacheControl())
.isEqualToComparingFieldByField(
CacheControl.maxAge(5, TimeUnit.SECONDS));
......@@ -436,6 +438,7 @@ public class WebFluxAutoConfigurationTests {
assertThat(handlerMap).hasSize(2);
for (Object handler : handlerMap.values()) {
if (handler instanceof ResourceWebHandler) {
Assertions.setExtractBareNamePropertyMethods(false);
assertThat(((ResourceWebHandler) handler).getCacheControl())
.isEqualToComparingFieldByField(
CacheControl.maxAge(5, TimeUnit.SECONDS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment