Skip to content

Commit e2fb093

Browse files
dreis2211snicoll
authored andcommitted
Polish
See gh-12202
1 parent 602f733 commit e2fb093

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ private boolean hasConfigurationProcessorOnClasspath(JavaCompile compile) {
167167
? compile.getOptions().getAnnotationProcessorPath().getFiles()
168168
: compile.getClasspath().getFiles();
169169
return files.stream().map(File::getName)
170-
.filter((name) -> name.startsWith("spring-boot-configuration-processor"))
171-
.findFirst().isPresent();
170+
.anyMatch((name) -> name.startsWith("spring-boot-configuration-processor"));
172171
}
173172

174173
private void configureAdditionalMetadataLocations(JavaCompile compile,

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SystemEnvironmentPropertyMapper.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.boot.context.properties.source;
1818

19-
import java.util.stream.IntStream;
20-
2119
import org.springframework.boot.context.properties.source.ConfigurationPropertyName.Form;
2220

2321
/**
@@ -95,7 +93,7 @@ private String convertLegacyName(ConfigurationPropertyName name) {
9593
}
9694

9795
private Object convertLegacyNameElement(String element) {
98-
return element.replace("-", "_").toUpperCase();
96+
return element.replace('-', '_').toUpperCase();
9997
}
10098

10199
private CharSequence processElementValue(CharSequence value) {
@@ -104,9 +102,7 @@ private CharSequence processElementValue(CharSequence value) {
104102
}
105103

106104
private static boolean isNumber(String string) {
107-
IntStream nonDigits = string.chars().filter((c) -> !Character.isDigit(c));
108-
boolean hasNonDigit = nonDigits.findFirst().isPresent();
109-
return !hasNonDigit;
105+
return string.chars().allMatch(Character::isDigit);
110106
}
111107

112108
}

0 commit comments

Comments
 (0)