fix null point error
This commit is contained in:
parent
ec59855850
commit
75b5742973
|
@ -1007,7 +1007,7 @@ public class SourceBuilder {
|
|||
String mockValue = "";
|
||||
if (DocClassUtil.isPrimitive(simpleTypeName)) {
|
||||
mockValue = paramsComments.get(paraName);
|
||||
if(mockValue.contains("|")){
|
||||
if (Objects.nonNull(mockValue) && mockValue.contains("|")) {
|
||||
mockValue = mockValue.substring(mockValue.lastIndexOf("|") + 1, mockValue.length());
|
||||
} else {
|
||||
mockValue = "";
|
||||
|
|
|
@ -181,7 +181,7 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate {
|
|||
String typeName = parameter.getType().getGenericCanonicalName();
|
||||
String simpleName = parameter.getType().getValue().toLowerCase();
|
||||
String fullTypeName = parameter.getType().getFullyQualifiedName();
|
||||
JavaClass javaClass = builder.getClassByName(fullTypeName);
|
||||
JavaClass javaClass = builder.getJavaProjectBuilder().getClassByName(fullTypeName);
|
||||
if (!DocClassUtil.isMvcIgnoreParams(typeName)) {
|
||||
if (!paramTagMap.containsKey(paramName) && DocClassUtil.isPrimitive(fullTypeName) && isStrict) {
|
||||
throw new RuntimeException("ERROR: Unable to find javadoc @param for actual param \""
|
||||
|
|
Loading…
Reference in New Issue