diff --git a/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderBaseModule.java b/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderBaseModule.java index 35e46a57cb..16ac66209c 100644 --- a/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderBaseModule.java +++ b/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderBaseModule.java @@ -267,13 +267,11 @@ public void getBeanInfo(BeanInfo beanInfo, Class objectClass) { } break; case "com.fasterxml.jackson.databind.annotation.JsonDeserialize": - case "com.alibaba.fastjson2.adapter.jackson.databind.annotation.JsonDeserialize": if (useJacksonAnnotation) { processJacksonJsonDeserializer(beanInfo, annotation); } break; case "com.fasterxml.jackson.annotation.JsonTypeName": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonTypeName": if (useJacksonAnnotation) { processJacksonJsonTypeName(beanInfo, annotation); } @@ -787,7 +785,6 @@ public void getFieldInfo(FieldInfo fieldInfo, Class objectClass, Method method) String annotationTypeName = annotationType.getName(); switch (annotationTypeName) { case "com.fasterxml.jackson.annotation.JsonIgnore": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonIgnore": if (useJacksonAnnotation) { processJacksonJsonIgnore(fieldInfo, annotation); } @@ -908,13 +905,11 @@ private void processAnnotation(FieldInfo fieldInfo, Annotation[] annotations) { String annotationTypeName = annotationType.getName(); switch (annotationTypeName) { case "com.fasterxml.jackson.annotation.JsonIgnore": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonIgnore": if (useJacksonAnnotation) { processJacksonJsonIgnore(fieldInfo, annotation); } break; case "com.fasterxml.jackson.annotation.JsonAnyGetter": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonAnyGetter": if (useJacksonAnnotation) { fieldInfo.features |= FieldInfo.UNWRAPPED_MASK; } @@ -1012,9 +1007,7 @@ private void processJacksonJsonDeserialize(FieldInfo fieldInfo, Annotation annot private Class processUsing(Class using) { String usingName = using.getName(); String noneClassName0 = "com.fasterxml.jackson.databind.JsonDeserializer$None"; - String noneClassName1 = "com.alibaba.fastjson2.adapter.jackson.databind.JsonDeserializer$None"; if (!noneClassName0.equals(usingName) - && !noneClassName1.equals(usingName) && ObjectReader.class.isAssignableFrom(using) ) { return using; @@ -1379,7 +1372,6 @@ private void getCreator(BeanInfo beanInfo, Class objectClass, Constructor con }); break; case "com.fasterxml.jackson.annotation.JsonCreator": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonCreator": if (JSONFactory.isUseJacksonAnnotation()) { creatorMethod = true; } @@ -1442,7 +1434,6 @@ private void getCreator(BeanInfo beanInfo, Class objectClass, Method method) }); break; case "com.fasterxml.jackson.annotation.JsonCreator": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonCreator": if (JSONFactory.isUseJacksonAnnotation()) { creatorMethod = true; BeanUtils.annotationMethods(annotationType, m1 -> { diff --git a/core/src/main/java/com/alibaba/fastjson2/util/BeanUtils.java b/core/src/main/java/com/alibaba/fastjson2/util/BeanUtils.java index 3ed8b1031b..9b07d57b8f 100644 --- a/core/src/main/java/com/alibaba/fastjson2/util/BeanUtils.java +++ b/core/src/main/java/com/alibaba/fastjson2/util/BeanUtils.java @@ -524,7 +524,6 @@ public static void setters(Class objectClass, BeanInfo beanInfo, Class mixin, Co switch (annotationType.getName()) { case "com.fasterxml.jackson.annotation.JsonAnySetter": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonAnySetter": if (JSONFactory.isUseJacksonAnnotation()) { unwrapped.set(true); } @@ -1099,10 +1098,8 @@ private static boolean isJSONField(AnnotatedElement element) { case "com.alibaba.fastjson2.annotation.JSONField": return true; case "com.fasterxml.jackson.annotation.JsonValue": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonValue": case "com.fasterxml.jackson.annotation.JsonRawValue": case "com.fasterxml.jackson.annotation.JsonProperty": - case "com.alibaba.fastjson2.adapter.jackson.annotation.JsonProperty": if (JSONFactory.isUseJacksonAnnotation()) { return true; }