Merge branch '3.2.x'
This commit is contained in:
@@ -93,7 +93,7 @@ public class GsonAutoConfiguration {
|
||||
map.from(properties::getFieldNamingPolicy).to(builder::setFieldNamingPolicy);
|
||||
map.from(properties::getPrettyPrinting).whenTrue().toCall(builder::setPrettyPrinting);
|
||||
map.from(properties::getLenient).whenTrue().toCall(builder::setLenient);
|
||||
map.from(properties::getDisableHtmlEscaping).whenFalse().toCall(builder::disableHtmlEscaping);
|
||||
map.from(properties::getDisableHtmlEscaping).whenTrue().toCall(builder::disableHtmlEscaping);
|
||||
map.from(properties::getDateFormat).to(builder::setDateFormat);
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ class GsonAutoConfigurationTests {
|
||||
void withDisableHtmlEscapingTrue() {
|
||||
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:true").run((context) -> {
|
||||
Gson gson = context.getBean(Gson.class);
|
||||
assertThat(gson.htmlSafe()).isTrue();
|
||||
assertThat(gson.htmlSafe()).isFalse();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ class GsonAutoConfigurationTests {
|
||||
void withDisableHtmlEscapingFalse() {
|
||||
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:false").run((context) -> {
|
||||
Gson gson = context.getBean(Gson.class);
|
||||
assertThat(gson.htmlSafe()).isFalse();
|
||||
assertThat(gson.htmlSafe()).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user