Polish
This commit is contained in:
@@ -27,7 +27,6 @@ import java.util.Set;
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -111,7 +110,6 @@ public enum AccessVisibility {
|
||||
return forResolvableType(resolvableType, new HashSet<>());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static AccessVisibility forResolvableType(ResolvableType resolvableType,
|
||||
Set<ResolvableType> seen) {
|
||||
if (!seen.add(resolvableType)) {
|
||||
|
||||
@@ -72,7 +72,7 @@ public final class GeneratedMethod {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name.toString();
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class GeneratedMethods {
|
||||
private final List<GeneratedMethod> generatedMethods;
|
||||
|
||||
/**
|
||||
* Create a new {@link GeneratedMethods} instance backed by the given
|
||||
* {@link MethodNameGenerator}.
|
||||
* Create a new {@link GeneratedMethods} using the specified method name
|
||||
* generator.
|
||||
* @param methodNameGenerator the method name generator
|
||||
*/
|
||||
GeneratedMethods(Function<MethodName, String> methodNameGenerator) {
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.aot.generate;
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -115,7 +116,7 @@ final class MethodName {
|
||||
.map(StringUtils::capitalize).collect(Collectors.joining()));
|
||||
}
|
||||
|
||||
private static String clean(String part) {
|
||||
private static String clean(@Nullable String part) {
|
||||
char[] chars = (part != null) ? part.toCharArray() : new char[0];
|
||||
StringBuilder name = new StringBuilder(chars.length);
|
||||
boolean uppercase = false;
|
||||
|
||||
Reference in New Issue
Block a user