You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NullPointerException throws when class using com.fasterxml.jackson.annotation.JsonIdentityInfo annotation to avoid circular references. JsonIdentityInfo annotation generates property of type: com.fasterxml.jackson.databind.deser.impl.ObjectIdValueProperty.
And result of method ObjectIdValueProperty#getMember always is null.
This is an example of a class that causes an error:
@JsonIdentityInfo(generator = com.fasterxml.jackson.annotation.ObjectIdGenerators.IntSequenceGenerator.class)
class TestObject {
public String foo;
public String bar;
}
This is an exception with stack trace:
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.introspect.AnnotatedMember.getMember()" because the return value of "com.fasterxml.jackson.databind.BeanProperty.getMember()" is null
at cz.habarta.typescript.generator.parser.Jackson2Parser$BeanHelpers.getFieldIndex(Jackson2Parser.java:688)
at cz.habarta.typescript.generator.parser.Jackson2Parser$BeanHelpers.getFieldIndex(Jackson2Parser.java:681)
at cz.habarta.typescript.generator.parser.Jackson2Parser$BeanHelpers.lambda$getPropertiesPairs$6(Jackson2Parser.java:640)
at cz.habarta.typescript.generator.parser.Jackson2Parser$BeanHelpers.getPropertiesPairs(Jackson2Parser.java:642)
at cz.habarta.typescript.generator.parser.Jackson2Parser$BeanHelpers.getPropertiesAndAccess(Jackson2Parser.java:605)
at cz.habarta.typescript.generator.parser.Jackson2Parser.parseBean(Jackson2Parser.java:264)
at cz.habarta.typescript.generator.parser.Jackson2Parser.parseClass(Jackson2Parser.java:254)
at cz.habarta.typescript.generator.parser.ModelParser.parseQueue(ModelParser.java:108)
at cz.habarta.typescript.generator.parser.ModelParser.parseModel(ModelParser.java:67)
at cz.habarta.typescript.generator.TypeScriptGenerator.generateTypeScript(TypeScriptGenerator.java:73)
at cz.habarta.typescript.generator.gradle.GenerateTask.generate(GenerateTask.java:263)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
The text was updated successfully, but these errors were encountered:
NullPointerException
throws when class usingcom.fasterxml.jackson.annotation.JsonIdentityInfo
annotation to avoid circular references.JsonIdentityInfo
annotation generates property of type:com.fasterxml.jackson.databind.deser.impl.ObjectIdValueProperty
.And result of method
ObjectIdValueProperty#getMember
always isnull
.This is an example of a class that causes an error:
This is an exception with stack trace:
The text was updated successfully, but these errors were encountered: