Merge branch '2.2.x' into 2.3.x
This commit is contained in:
commit
0dd38a7264
|
@ -30,6 +30,7 @@ import java.util.jar.JarOutputStream;
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
|
@ -51,11 +52,16 @@ class JarFileWrapperTests {
|
||||||
private JarFileWrapper wrapper;
|
private JarFileWrapper wrapper;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup(@TempDir File temp) throws IOException {
|
void setup(@TempDir File temp) throws Exception {
|
||||||
this.parent = new SpyJarFile(createTempJar(temp));
|
this.parent = new SpyJarFile(createTempJar(temp));
|
||||||
this.wrapper = new JarFileWrapper(this.parent);
|
this.wrapper = new JarFileWrapper(this.parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
void cleanup() throws Exception {
|
||||||
|
this.parent.close();
|
||||||
|
}
|
||||||
|
|
||||||
private File createTempJar(File temp) throws IOException {
|
private File createTempJar(File temp) throws IOException {
|
||||||
File file = new File(temp, "temp.jar");
|
File file = new File(temp, "temp.jar");
|
||||||
new JarOutputStream(new FileOutputStream(file)).close();
|
new JarOutputStream(new FileOutputStream(file)).close();
|
||||||
|
|
Loading…
Reference in New Issue