修改dubbo返回泛型的T是byte数组时抛出异常问题 #48
This commit is contained in:
parent
5ce3b54da4
commit
c1908d1329
|
@ -271,6 +271,9 @@ public class RpcDocBuildTemplate implements IDocBuildTemplate<RpcApiDoc> {
|
|||
returnClass = returnClass.replace(simpleReturn, JavaClassUtil.getClassSimpleName(simpleReturn));
|
||||
String[] arrays = DocClassUtil.getSimpleGicName(returnClass);
|
||||
for (String str : arrays) {
|
||||
if(str.contains("[")){
|
||||
str = str.substring(0,str.indexOf("["));
|
||||
}
|
||||
returnClass = returnClass.replaceAll(str, JavaClassUtil.getClassSimpleName(str));
|
||||
}
|
||||
methodBuilder.append(returnClass).append(" ");
|
||||
|
|
|
@ -201,6 +201,13 @@ public class JavaClassUtil {
|
|||
int index = className.lastIndexOf(".");
|
||||
className = className.substring(index + 1, className.length());
|
||||
}
|
||||
if (className.contains("[")) {
|
||||
int index = className.indexOf("[");
|
||||
className = className.substring(0, index);
|
||||
}
|
||||
if (className.contains(">")) {
|
||||
className = className.substring(0,className.length() - 1);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue