fix(ParamsBuildHelper.java): replace method invoke

Using com.thoughtworks.qdox.model.impl.getValue instead of
com.thoughtworks.qdox.model.impl.getSimpleName
make a Real
simpleClassName return
This commit is contained in:
Tak 2020-03-25 15:19:28 +08:00
parent 781f8879a8
commit 989eda11eb
1 changed files with 6 additions and 6 deletions

View File

@ -122,10 +122,10 @@ public class ParamsBuildHelper {
an: an:
for (JavaAnnotation annotation : javaAnnotations) { for (JavaAnnotation annotation : javaAnnotations) {
String annotationName = annotation.getType().getSimpleName(); String simpleAnnotationName = annotation.getType().getValue();
if (DocAnnotationConstants.SHORT_JSON_IGNORE.equals(annotationName) && isResp) { if (DocAnnotationConstants.SHORT_JSON_IGNORE.equals(simpleAnnotationName) && isResp) {
continue out; continue out;
} else if (DocAnnotationConstants.SHORT_JSON_FIELD.equals(annotationName) && isResp) { } else if (DocAnnotationConstants.SHORT_JSON_FIELD.equals(simpleAnnotationName) && isResp) {
if (null != annotation.getProperty(DocAnnotationConstants.SERIALIZE_PROP)) { if (null != annotation.getProperty(DocAnnotationConstants.SERIALIZE_PROP)) {
if (Boolean.FALSE.toString().equals(annotation.getProperty(DocAnnotationConstants.SERIALIZE_PROP).toString())) { if (Boolean.FALSE.toString().equals(annotation.getProperty(DocAnnotationConstants.SERIALIZE_PROP).toString())) {
continue out; continue out;
@ -133,11 +133,11 @@ public class ParamsBuildHelper {
} else if (null != annotation.getProperty(DocAnnotationConstants.NAME_PROP)) { } else if (null != annotation.getProperty(DocAnnotationConstants.NAME_PROP)) {
fieldName = StringUtil.removeQuotes(annotation.getProperty(DocAnnotationConstants.NAME_PROP).toString()); fieldName = StringUtil.removeQuotes(annotation.getProperty(DocAnnotationConstants.NAME_PROP).toString());
} }
} else if (DocAnnotationConstants.SHORT_JSON_PROPERTY.equals(annotationName) && isResp) { } else if (DocAnnotationConstants.SHORT_JSON_PROPERTY.equals(simpleAnnotationName) && isResp) {
if (null != annotation.getProperty(DocAnnotationConstants.VALUE_PROP)) { if (null != annotation.getProperty(DocAnnotationConstants.VALUE_PROP)) {
fieldName = StringUtil.removeQuotes(annotation.getProperty(DocAnnotationConstants.VALUE_PROP).toString()); fieldName = StringUtil.removeQuotes(annotation.getProperty(DocAnnotationConstants.VALUE_PROP).toString());
} }
} else if (ValidatorAnnotations.NULL.equals(annotationName)) { } else if (ValidatorAnnotations.NULL.equals(simpleAnnotationName)) {
List<String> groupClassList = JavaClassUtil.getParamGroupJavaClass(annotation); List<String> groupClassList = JavaClassUtil.getParamGroupJavaClass(annotation);
for (String javaClass : groupClassList) { for (String javaClass : groupClassList) {
if (groupClasses.contains(javaClass)) { if (groupClasses.contains(javaClass)) {
@ -145,7 +145,7 @@ public class ParamsBuildHelper {
break an; break an;
} }
} }
} else if (JavaClassValidateUtil.isJSR303Required(annotationName)) { } else if (JavaClassValidateUtil.isJSR303Required(simpleAnnotationName)) {
annotationCounter++; annotationCounter++;
boolean hasGroup = false; boolean hasGroup = false;
List<String> groupClassList = JavaClassUtil.getParamGroupJavaClass(annotation); List<String> groupClassList = JavaClassUtil.getParamGroupJavaClass(annotation);