Skip to content

Commit feafcbc

Browse files
committed
backport class scanner and fix NPE
1 parent f95fbd8 commit feafcbc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/it/aboutbits/springboot/toolbox/jackson/CustomTypeDeserializer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public Class<T> handledType() {
4444

4545
@Override
4646
public T deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
47+
if (jsonParser.getCurrentToken() == null) {
48+
return null;
49+
}
50+
4751
var value = typeConverter.apply(jsonParser);
4852

4953
try {

0 commit comments

Comments
 (0)