Unify method visibility of private classes

Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
This commit is contained in:
Phillip Webb
2019-07-01 12:29:51 -07:00
parent 0a02a3a19c
commit a66c4d3096
910 changed files with 3754 additions and 3945 deletions

View File

@@ -389,7 +389,7 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
return read;
}
public boolean hasZipHeader() {
boolean hasZipHeader() {
return Arrays.equals(this.header, ZIP_HEADER);
}
@@ -431,7 +431,7 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
}
}
public void setupStoredEntry(JarArchiveEntry entry) {
void setupStoredEntry(JarArchiveEntry entry) {
entry.setSize(this.size);
entry.setCompressedSize(this.size);
entry.setCrc(this.crc.getValue());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ public abstract class LogbackInitializer {
private static class Initializer {
public void setRootLogLevel() {
void setRootLogLevel() {
ILoggerFactory factory = StaticLoggerBinder.getSingleton().getLoggerFactory();
Logger logger = factory.getLogger(Logger.ROOT_LOGGER_NAME);
((ch.qos.logback.classic.Logger) logger).setLevel(Level.INFO);

View File

@@ -181,7 +181,7 @@ class MainClassFinderTests {
}
}
private static class ClassNameCollector implements MainClassCallback<Object> {
static class ClassNameCollector implements MainClassCallback<Object> {
private final List<String> classNames = new ArrayList<>();
@@ -191,7 +191,7 @@ class MainClassFinderTests {
return null;
}
public List<String> getClassNames() {
List<String> getClassNames() {
return this.classNames;
}

View File

@@ -680,7 +680,7 @@ class RepackagerTests {
return entryNames;
}
private static class MockLauncherScript implements LaunchScript {
static class MockLauncherScript implements LaunchScript {
private final byte[] bytes;
@@ -695,7 +695,7 @@ class RepackagerTests {
}
public static class TestLayoutFactory implements LayoutFactory {
static class TestLayoutFactory implements LayoutFactory {
@Override
public Layout getLayout(File source) {
@@ -704,7 +704,7 @@ class RepackagerTests {
}
private static class TestLayout extends Layouts.Jar implements CustomLoaderLayout {
static class TestLayout extends Layouts.Jar implements CustomLoaderLayout {
@Override
public void writeLoadedClasses(LoaderClassesWriter writer) throws IOException {