Skip to content

Commit 593862b

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-42417
2 parents c81913b + 0781e71 commit 593862b

File tree

8 files changed

+18
-24
lines changed

8 files changed

+18
-24
lines changed

buildSrc/src/main/java/org/springframework/boot/build/bom/CheckLinks.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ void releaseNotes() {
6464
try {
6565
uri = new URI(link);
6666
ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.HEAD, null, String.class);
67-
System.out.println("[%3d] %s - %s (%s)".formatted(response.getStatusCode().value(),
68-
library.getName(), name, uri));
67+
System.out.printf("[%3d] %s - %s (%s)%n", response.getStatusCode().value(), library.getName(), name,
68+
uri);
6969
}
7070
catch (URISyntaxException ex) {
7171
throw new RuntimeException(ex);

buildSrc/src/main/java/org/springframework/boot/build/test/DockerTestPlugin.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,14 @@ private SourceSet createSourceSet(Project project) {
9898

9999
private Provider<Test> createTestTask(Project project, SourceSet dockerTestSourceSet,
100100
Provider<DockerTestBuildService> buildService) {
101-
Provider<Test> dockerTest = project.getTasks().register(DOCKER_TEST_TASK_NAME, Test.class, (task) -> {
101+
return project.getTasks().register(DOCKER_TEST_TASK_NAME, Test.class, (task) -> {
102102
task.usesService(buildService);
103103
task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
104104
task.setDescription("Runs Docker-based tests.");
105105
task.setTestClassesDirs(dockerTestSourceSet.getOutput().getClassesDirs());
106106
task.setClasspath(dockerTestSourceSet.getRuntimeClasspath());
107107
task.shouldRunAfter(JavaPlugin.TEST_TASK_NAME);
108108
});
109-
return dockerTest;
110109
}
111110

112111
}

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarEntriesStream.java

-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ class JarEntriesStream implements Closeable {
5454

5555
JarEntry getNextEntry() throws IOException {
5656
this.entry = this.in.getNextJarEntry();
57-
if (this.entry != null) {
58-
this.entry.getSize();
59-
}
6057
this.inflater.reset();
6158
return this.entry;
6259
}

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/JarUrlConnection.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ public boolean getAllowUserInteraction() {
211211
}
212212

213213
@Override
214-
public void setAllowUserInteraction(boolean allowuserinteraction) {
214+
public void setAllowUserInteraction(boolean allowUserInteraction) {
215215
if (this.jarFileConnection != null) {
216-
this.jarFileConnection.setAllowUserInteraction(allowuserinteraction);
216+
this.jarFileConnection.setAllowUserInteraction(allowUserInteraction);
217217
}
218218
}
219219

@@ -223,9 +223,9 @@ public boolean getUseCaches() {
223223
}
224224

225225
@Override
226-
public void setUseCaches(boolean usecaches) {
226+
public void setUseCaches(boolean useCaches) {
227227
if (this.jarFileConnection != null) {
228-
this.jarFileConnection.setUseCaches(usecaches);
228+
this.jarFileConnection.setUseCaches(useCaches);
229229
}
230230
}
231231

@@ -235,9 +235,9 @@ public boolean getDefaultUseCaches() {
235235
}
236236

237237
@Override
238-
public void setDefaultUseCaches(boolean defaultusecaches) {
238+
public void setDefaultUseCaches(boolean defaultUseCaches) {
239239
if (this.jarFileConnection != null) {
240-
this.jarFileConnection.setDefaultUseCaches(defaultusecaches);
240+
this.jarFileConnection.setDefaultUseCaches(defaultUseCaches);
241241
}
242242
}
243243

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/LazyDelegatingInputStream.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,9 +64,9 @@ public boolean markSupported() {
6464
}
6565

6666
@Override
67-
public synchronized void mark(int readlimit) {
67+
public synchronized void mark(int readLimit) {
6868
try {
69-
in().mark(readlimit);
69+
in().mark(readLimit);
7070
}
7171
catch (IOException ex) {
7272
// Ignore

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/nio/file/NestedFileSystem.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,9 @@ private boolean hasFileSystem(URI uri) {
9898

9999
private boolean isCreatingNewFileSystem() {
100100
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
101-
if (stack != null) {
102-
for (StackTraceElement element : stack) {
103-
if (FILE_SYSTEMS_CLASS_NAME.equals(element.getClassName())) {
104-
return "newFileSystem".equals(element.getMethodName());
105-
}
101+
for (StackTraceElement element : stack) {
102+
if (FILE_SYSTEMS_CLASS_NAME.equals(element.getClassName())) {
103+
return "newFileSystem".equals(element.getMethodName());
106104
}
107105
}
108106
return false;

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/nio/file/NestedFileSystemProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@
5050
*/
5151
public class NestedFileSystemProvider extends FileSystemProvider {
5252

53-
private Map<Path, NestedFileSystem> fileSystems = new HashMap<>();
53+
private final Map<Path, NestedFileSystem> fileSystems = new HashMap<>();
5454

5555
@Override
5656
public String getScheme() {

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/nio/file/UriPathEncoder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class UriPathEncoder {
2828

2929
// Based on org.springframework.web.util.UriUtils
3030

31-
private static char[] ALLOWED = "/:@-._~!$&\'()*+,;=".toCharArray();
31+
private static final char[] ALLOWED = "/:@-._~!$&\'()*+,;=".toCharArray();
3232

3333
private UriPathEncoder() {
3434
}

0 commit comments

Comments
 (0)