Polish
This commit is contained in:
@@ -178,11 +178,11 @@ public class JsonComponentModule extends SimpleModule implements BeanFactoryAwar
|
||||
|
||||
}
|
||||
|
||||
private static class JsonComponentAotContribution implements BeanFactoryInitializationAotContribution {
|
||||
private static final class JsonComponentAotContribution implements BeanFactoryInitializationAotContribution {
|
||||
|
||||
private final Map<Class<?>, List<Class<?>>> innerComponents;
|
||||
|
||||
public JsonComponentAotContribution(Map<Class<?>, List<Class<?>>> innerComponents) {
|
||||
private JsonComponentAotContribution(Map<Class<?>, List<Class<?>>> innerComponents) {
|
||||
this.innerComponents = innerComponents;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ class JsonComponentModuleTests {
|
||||
private void assertKeyDeserialize(Module module) throws IOException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.registerModule(module);
|
||||
TypeReference<Map<NameAndAge, Boolean>> typeRef = new TypeReference<Map<NameAndAge, Boolean>>() {
|
||||
TypeReference<Map<NameAndAge, Boolean>> typeRef = new TypeReference<>() {
|
||||
};
|
||||
Map<NameAndAge, Boolean> map = mapper.readValue("{\"spring is 100\": true}", typeRef);
|
||||
assertThat(map).containsEntry(new NameAndAge("spring", 100), true);
|
||||
@@ -210,7 +210,7 @@ class JsonComponentModuleTests {
|
||||
@JsonComponent
|
||||
static class ComponentWithInnerAbstractClass {
|
||||
|
||||
static abstract class AbstractSerializer extends NameAndAgeJsonComponent.Serializer {
|
||||
abstract static class AbstractSerializer extends NameAndAgeJsonComponent.Serializer {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user