Skip to content

Polish #42413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Polish #42413

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ void releaseNotes() {
try {
uri = new URI(link);
ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.HEAD, null, String.class);
System.out.println("[%3d] %s - %s (%s)".formatted(response.getStatusCode().value(),
library.getName(), name, uri));
System.out.printf("[%3d] %s - %s (%s)%n", response.getStatusCode().value(),
library.getName(), name, uri);
}
catch (URISyntaxException ex) {
throw new RuntimeException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ private SourceSet createSourceSet(Project project) {

private Provider<Test> createTestTask(Project project, SourceSet dockerTestSourceSet,
Provider<DockerTestBuildService> buildService) {
Provider<Test> dockerTest = project.getTasks().register(DOCKER_TEST_TASK_NAME, Test.class, (task) -> {
return project.getTasks().register(DOCKER_TEST_TASK_NAME, Test.class, (task) -> {
task.usesService(buildService);
task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
task.setDescription("Runs Docker-based tests.");
task.setTestClassesDirs(dockerTestSourceSet.getOutput().getClassesDirs());
task.setClasspath(dockerTestSourceSet.getRuntimeClasspath());
task.shouldRunAfter(JavaPlugin.TEST_TASK_NAME);
});
return dockerTest;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ class JarEntriesStream implements Closeable {

JarEntry getNextEntry() throws IOException {
this.entry = this.in.getNextJarEntry();
if (this.entry != null) {
this.entry.getSize();
}
this.inflater.reset();
return this.entry;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ public boolean getAllowUserInteraction() {
}

@Override
public void setAllowUserInteraction(boolean allowuserinteraction) {
public void setAllowUserInteraction(boolean allowUserInteraction) {
if (this.jarFileConnection != null) {
this.jarFileConnection.setAllowUserInteraction(allowuserinteraction);
this.jarFileConnection.setAllowUserInteraction(allowUserInteraction);
}
}

Expand All @@ -223,9 +223,9 @@ public boolean getUseCaches() {
}

@Override
public void setUseCaches(boolean usecaches) {
public void setUseCaches(boolean useCaches) {
if (this.jarFileConnection != null) {
this.jarFileConnection.setUseCaches(usecaches);
this.jarFileConnection.setUseCaches(useCaches);
}
}

Expand All @@ -235,9 +235,9 @@ public boolean getDefaultUseCaches() {
}

@Override
public void setDefaultUseCaches(boolean defaultusecaches) {
public void setDefaultUseCaches(boolean defaultUseCaches) {
if (this.jarFileConnection != null) {
this.jarFileConnection.setDefaultUseCaches(defaultusecaches);
this.jarFileConnection.setDefaultUseCaches(defaultUseCaches);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public boolean markSupported() {
}

@Override
public synchronized void mark(int readlimit) {
public synchronized void mark(int readLimit) {
try {
in().mark(readlimit);
in().mark(readLimit);
}
catch (IOException ex) {
// Ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ private boolean hasFileSystem(URI uri) {

private boolean isCreatingNewFileSystem() {
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
if (stack != null) {
for (StackTraceElement element : stack) {
if (FILE_SYSTEMS_CLASS_NAME.equals(element.getClassName())) {
return "newFileSystem".equals(element.getMethodName());
}
for (StackTraceElement element : stack) {
if (FILE_SYSTEMS_CLASS_NAME.equals(element.getClassName())) {
return "newFileSystem".equals(element.getMethodName());
}
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*/
public class NestedFileSystemProvider extends FileSystemProvider {

private Map<Path, NestedFileSystem> fileSystems = new HashMap<>();
private final Map<Path, NestedFileSystem> fileSystems = new HashMap<>();

@Override
public String getScheme() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class UriPathEncoder {

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

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

private UriPathEncoder() {
}
Expand Down