Skip to content

Commit ff8c27a

Browse files
committed
Preserve only method reference.
1 parent 489d2b7 commit ff8c27a

File tree

7 files changed

+27
-16
lines changed

7 files changed

+27
-16
lines changed

buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class AntoraAsciidocAttributes {
5656
public AntoraAsciidocAttributes(Project project, BomExtension dependencyBom,
5757
Map<String, String> dependencyVersions) {
5858
this.version = String.valueOf(project.getVersion());
59-
this.latestVersion = Boolean.parseBoolean(String.valueOf(project.findProperty("latestVersion")));
59+
this.latestVersion = Boolean.valueOf(String.valueOf(project.findProperty("latestVersion")));
6060
this.artifactRelease = ArtifactRelease.forProject(project);
6161
this.libraries = dependencyBom.getLibraries();
6262
this.dependencyVersions = dependencyVersions;

buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ public void checkForProhibitedDependencies() {
7070

7171
private boolean prohibited(ModuleVersionIdentifier id) {
7272
String group = id.getGroup();
73-
switch (group) {
74-
case "javax.batch", "javax.cache", "javax.money" -> {
75-
return false;
76-
}
77-
case "org.codehaus.groovy", "org.eclipse.jetty.toolchain" -> {
78-
return true;
79-
}
73+
if (group.equals("javax.batch")) {
74+
return false;
75+
}
76+
if (group.equals("javax.cache")) {
77+
return false;
78+
}
79+
if (group.equals("javax.money")) {
80+
return false;
81+
}
82+
if (group.equals("org.codehaus.groovy")) {
83+
return true;
84+
}
85+
if (group.equals("org.eclipse.jetty.toolchain")) {
86+
return true;
8087
}
8188
if (group.startsWith("javax")) {
8289
return true;

spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtensionForkParameterizedTests.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ class ModifiedClassPathExtensionForkParameterizedTests {
3737
@ParameterizedTest
3838
@ValueSource(strings = { "one", "two", "three" })
3939
void testIsInvokedOnceForEachArgument(String argument) {
40-
switch (argument) {
41-
case "one" -> assertThat(arguments).isEmpty();
42-
case "two" -> assertThat(arguments).doesNotContain("two", "three");
43-
case "three" -> assertThat(arguments).doesNotContain("three");
40+
if (argument.equals("one")) {
41+
assertThat(arguments).isEmpty();
42+
}
43+
else if (argument.equals("two")) {
44+
assertThat(arguments).doesNotContain("two", "three");
45+
}
46+
else if (argument.equals("three")) {
47+
assertThat(arguments).doesNotContain("three");
4448
}
4549
arguments.add(argument);
4650
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private PropertyResolver getPropertyResolver() {
219219
if (this.environment instanceof ConfigurableEnvironment configurableEnvironment) {
220220
PropertySourcesPropertyResolver resolver = new PropertySourcesPropertyResolver(
221221
configurableEnvironment.getPropertySources());
222-
resolver.setConversionService(configurableEnvironment.getConversionService());
222+
resolver.setConversionService(((ConfigurableEnvironment) this.environment).getConversionService());
223223
resolver.setIgnoreUnresolvableNestedPlaceholders(true);
224224
return resolver;
225225
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/NestedJarResourceSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ protected boolean isMultiRelease() {
128128
}
129129
}
130130
}
131-
return this.multiRelease;
131+
return this.multiRelease.booleanValue();
132132
}
133133

134134
@Override

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/sql/init/AbstractScriptDatabaseInitializerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void whenDatabaseIsInitializedWithDirectoryLocationsThenFailureIsHelpful() {
5858
@Test
5959
void whenContinueOnErrorIsFalseThenInitializationFailsOnError() {
6060
DatabaseInitializationSettings settings = new DatabaseInitializationSettings();
61-
settings.setDataLocations(List.of("data.sql"));
61+
settings.setDataLocations(Arrays.asList("data.sql"));
6262
T initializer = createEmbeddedDatabaseInitializer(settings);
6363
assertThatExceptionOfType(DataAccessException.class).isThrownBy(initializer::initializeDatabase);
6464
assertThatDatabaseWasAccessed(initializer);

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void setServletRegistrationBeanMustNotBeNull() {
131131
void addServletRegistrationBeanMustNotBeNull() {
132132
AbstractFilterRegistrationBean<?> bean = createFilterRegistrationBean();
133133
assertThatIllegalArgumentException()
134-
.isThrownBy(() -> bean.addServletRegistrationBeans((ServletRegistrationBean<?>[]) null))
134+
.isThrownBy(() -> bean.addServletRegistrationBeans((ServletRegistrationBean[]) null))
135135
.withMessageContaining("ServletRegistrationBeans must not be null");
136136
}
137137

0 commit comments

Comments
 (0)