Remove public modifier on JUnit5 lifecycle methods

See gh-17292
This commit is contained in:
Stephane Nicoll
2019-06-21 18:09:05 +02:00
parent c7d3b7a9f1
commit e560b7f6ba
310 changed files with 361 additions and 362 deletions

View File

@@ -62,14 +62,14 @@ class PropertiesLauncherTests {
private CapturedOutput capturedOutput;
@BeforeEach
public void setup(CapturedOutput capturedOutput) {
void setup(CapturedOutput capturedOutput) {
this.contextClassLoader = Thread.currentThread().getContextClassLoader();
System.setProperty("loader.home", new File("src/test/resources").getAbsolutePath());
this.capturedOutput = capturedOutput;
}
@AfterEach
public void close() {
void close() {
Thread.currentThread().setContextClassLoader(this.contextClassLoader);
System.clearProperty("loader.home");
System.clearProperty("loader.path");

View File

@@ -55,7 +55,7 @@ class ExplodedArchiveTests {
private ExplodedArchive archive;
@BeforeEach
public void setup() throws Exception {
void setup() throws Exception {
createArchive();
}

View File

@@ -58,12 +58,12 @@ class JarFileArchiveTests {
private String rootJarFileUrl;
@BeforeEach
public void setup() throws Exception {
void setup() throws Exception {
setup(false);
}
@AfterEach
public void tearDown() throws Exception {
void tearDown() throws Exception {
this.archive.close();
}

View File

@@ -61,7 +61,7 @@ class RandomAccessDataFileTests {
private InputStream inputStream;
@BeforeEach
public void setup(@TempDir File tempDir) throws Exception {
void setup(@TempDir File tempDir) throws Exception {
this.tempFile = new File(tempDir, "tempFile");
FileOutputStream outputStream = new FileOutputStream(this.tempFile);
outputStream.write(BYTES);
@@ -71,7 +71,7 @@ class RandomAccessDataFileTests {
}
@AfterEach
public void cleanup() throws Exception {
void cleanup() throws Exception {
this.inputStream.close();
this.file.close();
}

View File

@@ -45,14 +45,14 @@ class CentralDirectoryParserTests {
private RandomAccessDataFile jarData;
@BeforeEach
public void setup(@TempDir File tempDir) throws Exception {
void setup(@TempDir File tempDir) throws Exception {
this.jarFile = new File(tempDir, "test.jar");
TestJarCreator.createTestJar(this.jarFile);
this.jarData = new RandomAccessDataFile(this.jarFile);
}
@AfterEach
public void tearDown() throws IOException {
void tearDown() throws IOException {
this.jarData.close();
}

View File

@@ -71,7 +71,7 @@ class JarFileTests {
private JarFile jarFile;
@BeforeEach
public void setup() throws Exception {
void setup() throws Exception {
this.rootJarFile = new File(this.tempDir, "root.jar");
TestJarCreator.createTestJar(this.rootJarFile);
this.jarFile = new JarFile(this.rootJarFile);

View File

@@ -47,14 +47,14 @@ class JarURLConnectionTests {
private JarFile jarFile;
@BeforeEach
public void setup(@TempDir File tempDir) throws Exception {
void setup(@TempDir File tempDir) throws Exception {
this.rootJarFile = new File(tempDir, "root.jar");
TestJarCreator.createTestJar(this.rootJarFile);
this.jarFile = new JarFile(this.rootJarFile);
}
@AfterEach
public void tearDown() throws Exception {
void tearDown() throws Exception {
this.jarFile.close();
}

View File

@@ -30,12 +30,12 @@ import static org.assertj.core.api.Assertions.assertThat;
class SystemPropertyUtilsTests {
@BeforeEach
public void init() {
void init() {
System.setProperty("foo", "bar");
}
@AfterEach
public void close() {
void close() {
System.clearProperty("foo");
}