mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Reduce StringBuilder creation in TypeExtractor.visitDeclared()
Closes gh-11845
This commit is contained in:
parent
11f700aa9d
commit
f86b44f2ec
@ -187,12 +187,18 @@ class TypeUtils {
|
||||
return getQualifiedName(enclosingElement) + "$"
|
||||
+ type.asElement().getSimpleName().toString();
|
||||
}
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(getQualifiedName(type.asElement()));
|
||||
if (!type.getTypeArguments().isEmpty()) {
|
||||
appendTypeArguments(type, name);
|
||||
String qualifiedName = getQualifiedName(type.asElement());
|
||||
if (type.getTypeArguments().isEmpty()) {
|
||||
return qualifiedName;
|
||||
}
|
||||
else {
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(qualifiedName);
|
||||
if (!type.getTypeArguments().isEmpty()) {
|
||||
appendTypeArguments(type, name);
|
||||
}
|
||||
return name.toString();
|
||||
}
|
||||
return name.toString();
|
||||
}
|
||||
|
||||
private void appendTypeArguments(DeclaredType type, StringBuilder name) {
|
||||
|
Loading…
Reference in New Issue
Block a user