Skip to content

Commit ac06d69

Browse files
[maven-tool] 修改检视意见
1 parent 98a41ad commit ac06d69

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

framework/fel/java/maven-plugins/tool-maven-plugin/src/main/java/modelengine/fel/maven/complie/parser/ByteBuddySchemaParser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import modelengine.fel.tool.info.entity.ReturnPropertyEntity;
1515
import modelengine.fel.tool.info.entity.SchemaEntity;
1616
import modelengine.fitframework.annotation.Property;
17+
import modelengine.fitframework.util.StringUtils;
1718

1819
import net.bytebuddy.description.annotation.AnnotationDescription;
1920
import net.bytebuddy.description.method.MethodDescription;
@@ -115,11 +116,11 @@ private static PropertyEntity parseProperty(ParameterDescription parameterDescri
115116
entity.setDescription(property.description());
116117
entity.setNeed(property.required());
117118
String defaultValue = property.defaultValue();
118-
if (defaultValue != null && !defaultValue.isEmpty()) {
119+
if (StringUtils.isNotEmpty(defaultValue)) {
119120
entity.setDefaultValue(defaultValue);
120121
}
121122
String example = property.example();
122-
if (example != null && !example.isEmpty()) {
123+
if (StringUtils.isNotEmpty(example)) {
123124
entity.setExamples(Collections.singletonList(example));
124125
}
125126
}
@@ -135,7 +136,7 @@ private static ReturnPropertyEntity parseReturnProperty(MethodDescription method
135136
returnPropertyEntity.setName(property.name());
136137
returnPropertyEntity.setDescription(property.description());
137138
String example = property.example();
138-
if (example != null && !example.isEmpty()) {
139+
if (StringUtils.isNotEmpty(example)) {
139140
returnPropertyEntity.setExamples(Collections.singletonList(example));
140141
}
141142
}

0 commit comments

Comments
 (0)