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
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Jackson version: 2.7.0 (jackson-core, jackson-databind, jackson-annotations)
Afterburner version: 2.7.0
Please take following example and run it through an ObjectMapper with afterburner module registered.
public static abstract class AbstractMyClass<ID> {
private ID id;
AbstractMyClass(ID id) {
setId(id);
}
public ID getId() {
return id;
}
public void setId(ID id) {
this.id = id;
}
}
public static class MyClass extends AbstractMyClass<String> {
public MyClass(String id) {
super(id);
}
}
Try to serialize MyClass and you will get the following error:
java.lang.VerifyError: Bad return type
Exception Details:
Location:
UnitTest$MyClass$Access4JacksonDeserializer26caf25d.stringGetter(Ljava/lang/Object;I)Ljava/lang/String; @10: areturn
Reason:
Type 'java/lang/Object' (current frame, stack[1]) is not assignable to 'java/lang/String' (from method signature)
Current Frame:
bci: @10
flags: { }
locals: { 'MyClass$Access4JacksonDeserializer26caf25d', 'java/lang/Object', integer, 'UnitTest$MyClass' }
stack: { integer, 'java/lang/Object' }
Bytecode:
0x0000000: 2bc0 000d 4e1c 2db6 0011 b0bb 0013 59bb
0x0000010: 0015 5912 17b7 001a 1cb6 001e b600 22b7
0x0000020: 0023 bf
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.fasterxml.jackson.module.afterburner.ser.PropertyAccessorCollector.findAccessor(PropertyAccessorCollector.java:99)
at com.fasterxml.jackson.module.afterburner.ser.SerializerModifier.changeProperties(SerializerModifier.java:63)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:401)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:271)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:223)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:157)
at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1215)
at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1167)
at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:490)
at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:688)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:107)
at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1428)
at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:1129)
at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:1001)
The text was updated successfully, but these errors were encountered:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Jackson version: 2.7.0 (jackson-core, jackson-databind, jackson-annotations)
Afterburner version: 2.7.0
Please take following example and run it through an ObjectMapper with afterburner module registered.
Try to serialize MyClass and you will get the following error:
java.lang.VerifyError: Bad return type
Exception Details:
Location:
UnitTest$MyClass$Access4JacksonDeserializer26caf25d.stringGetter(Ljava/lang/Object;I)Ljava/lang/String; @10: areturn
Reason:
Type 'java/lang/Object' (current frame, stack[1]) is not assignable to 'java/lang/String' (from method signature)
Current Frame:
bci: @10
flags: { }
locals: { 'MyClass$Access4JacksonDeserializer26caf25d', 'java/lang/Object', integer, 'UnitTest$MyClass' }
stack: { integer, 'java/lang/Object' }
Bytecode:
0x0000000: 2bc0 000d 4e1c 2db6 0011 b0bb 0013 59bb
0x0000010: 0015 5912 17b7 001a 1cb6 001e b600 22b7
0x0000020: 0023 bf
The text was updated successfully, but these errors were encountered: