mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
5e813f60b9
commit
d6d32ec01d
@ -45,7 +45,7 @@ public final class EndpointId {
|
||||
|
||||
private static final Pattern WARNING_PATTERN = Pattern.compile("[\\.\\-]+");
|
||||
|
||||
private static final String MIGRATE_LEGACY_NAMES_PROPRTY = "management.endpoints.migrate-legacy-ids";
|
||||
private static final String MIGRATE_LEGACY_NAMES_PROPERTY = "management.endpoints.migrate-legacy-ids";
|
||||
|
||||
private final String value;
|
||||
|
||||
@ -130,7 +130,7 @@ public final class EndpointId {
|
||||
}
|
||||
|
||||
private static String migrateLegacyId(Environment environment, String value) {
|
||||
if (environment.getProperty(MIGRATE_LEGACY_NAMES_PROPRTY, Boolean.class, false)) {
|
||||
if (environment.getProperty(MIGRATE_LEGACY_NAMES_PROPERTY, Boolean.class, false)) {
|
||||
return value.replace(".", "");
|
||||
}
|
||||
return value;
|
||||
|
@ -158,12 +158,12 @@ class PropertyDescriptorResolver {
|
||||
|
||||
private ExecutableElement findBoundConstructor() {
|
||||
ExecutableElement boundConstructor = null;
|
||||
for (ExecutableElement canidate : this.constructors) {
|
||||
if (!canidate.getParameters().isEmpty()) {
|
||||
for (ExecutableElement candidate : this.constructors) {
|
||||
if (!candidate.getParameters().isEmpty()) {
|
||||
if (boundConstructor != null) {
|
||||
return null;
|
||||
}
|
||||
boundConstructor = canidate;
|
||||
boundConstructor = candidate;
|
||||
}
|
||||
}
|
||||
return boundConstructor;
|
||||
|
Loading…
Reference in New Issue
Block a user