Skip to content

Commit 2ea1fad

Browse files
committed
small code optimization
1 parent 57aac4d commit 2ea1fad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

service/src/main/java/uk/nhs/adaptors/gp2gp/common/configuration/ObjectMapperPostProcessorConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ public class ObjectMapperPostProcessorConfig implements BeanPostProcessor {
1111

1212
@Override
1313
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
14-
if (bean instanceof ObjectMapper) {
15-
ObjectMapper objectMapper = (ObjectMapper) bean;
14+
if (bean instanceof ObjectMapper objectMapper) {
1615
objectMapper.getFactory().setStreamReadConstraints(StreamReadConstraints.builder().maxStringLength(Integer.MAX_VALUE).build());
1716
}
1817
return bean;

0 commit comments

Comments
 (0)