Skip to content

Commit 3713ecd

Browse files
committed
Fix checkstyle
1 parent c87e1a6 commit 3713ecd

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

spring-boot-testjars-maven/src/main/java/org/springframework/experimental/boot/server/exec/MavenClasspathEntry.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import java.util.Collections;
2222
import java.util.HashMap;
2323
import java.util.List;
24-
import java.util.Map;
25-
import java.util.Properties;
2624

2725
import org.apache.commons.logging.Log;
2826
import org.apache.commons.logging.LogFactory;

spring-boot-testjars-maven/src/test/java/org/springframework/experimental/boot/server/exec/MavenClasspathEntryTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ void runtimeDependencyResolved() {
5454
"org.springframework.boot:spring-boot-actuator-autoconfigure:3.4.1");
5555
List<String> entries = classpath.resolve();
5656
String runtimeDependency = "com/fasterxml/jackson/core/jackson-databind/2.18.2/jackson-databind-2.18.2.jar";
57-
assertThat(entries).anyMatch(entry -> entry.contains(runtimeDependency));
57+
assertThat(entries).anyMatch((entry) -> entry.contains(runtimeDependency));
5858
}
5959

6060
@Test
6161
void optionalDependencyNotResolved() {
6262
MavenClasspathEntry classpath = new MavenClasspathEntry("org.springframework.data:spring-data-commons:3.2.9");
6363
List<String> entries = classpath.resolve();
6464
String optionalDependency = "spring-expression";
65-
assertThat(entries).noneMatch(entry -> entry.contains(optionalDependency));
65+
assertThat(entries).noneMatch((entry) -> entry.contains(optionalDependency));
6666
}
6767

6868
@Test
@@ -77,8 +77,8 @@ void jdk() {
7777
String configServerPartialPath = "/org/springframework/cloud/spring-cloud-config-server/" + cloudVersion
7878
+ "/spring-cloud-config-server-" + cloudVersion + ".jar";
7979
String springCloudContextArtifactName = "spring-cloud-context";
80-
assertThat(entries).anyMatch(entry -> entry.contains(configServerPartialPath))
81-
.anyMatch(entry -> entry.contains(springCloudContextArtifactName));
80+
assertThat(entries).anyMatch((entry) -> entry.contains(configServerPartialPath))
81+
.anyMatch((entry) -> entry.contains(springCloudContextArtifactName));
8282
// .withFailMessage("Unable to find spring-boot-starter with path that contains "
8383
// + configServerPartialPath)
8484
}

spring-boot-testjars/src/main/java/org/springframework/experimental/boot/server/exec/CommonsExecWebServerFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public CommonsExecWebServerFactoryBean systemProperties(Consumer<Map<String, Str
110110
/**
111111
* If set, will start up in debug mode listening on the specified port.
112112
* @param debugPort the port to listen on or null (default) to disable debug mode.
113-
* @return
113+
* @return the {@link CommonsExecWebServerFactoryBean} for customization.
114114
*/
115115
public CommonsExecWebServerFactoryBean debugPort(Integer debugPort) {
116116
this.debugPort = debugPort;
@@ -121,7 +121,7 @@ public CommonsExecWebServerFactoryBean debugPort(Integer debugPort) {
121121
* If {@link #debugPort(Integer)} is set, then this determines if the server should be
122122
* suspended or not.
123123
* @param suspend true if should suspend, else false.
124-
* @return
124+
* @return the {@link CommonsExecWebServerFactoryBean} for customization.
125125
*/
126126
public CommonsExecWebServerFactoryBean suspend(boolean suspend) {
127127
this.suspend = suspend;

spring-boot-testjars/src/main/java/org/springframework/experimental/boot/server/exec/ScanningClasspathEntry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public List<String> resolve() {
7777
this.resources = getResources();
7878
this.classpath = createClasspath(this.resources);
7979
}
80-
return this.classpath == null ? Collections.emptyList()
81-
: Arrays.asList(this.classpath.toFile().getAbsolutePath());
80+
return (this.classpath != null) ? Arrays.asList(this.classpath.toFile().getAbsolutePath())
81+
: Collections.emptyList();
8282
}
8383

8484
private Path createClasspath(Resource[] resources) {

spring-boot-testjars/src/main/java/org/springframework/experimental/boot/server/exec/TempDir.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ static Path tempDir() {
3737
try {
3838
return Files.createTempDirectory("testjars-classpath-" + processId + "-");
3939
}
40-
catch (IOException e) {
41-
throw new RuntimeException(e);
40+
catch (IOException ex) {
41+
throw new RuntimeException(ex);
4242
}
4343
}
4444

0 commit comments

Comments
 (0)