Skip to content

Commit

Permalink
remove com.alibaba.fastjson2.adapter.jackson
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed May 31, 2024
1 parent 18622d0 commit 6704cbd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 -> {
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/java/com/alibaba/fastjson2/util/BeanUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6704cbd

Please sign in to comment.