Polish
This commit is contained in:
@@ -33,8 +33,6 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.springframework.boot.loader.Archive;
|
||||
import org.springframework.boot.loader.ExplodedArchive;
|
||||
import org.springframework.boot.loader.Archive.Entry;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
@@ -76,6 +74,7 @@ public class ExplodedArchiveTests {
|
||||
}
|
||||
}
|
||||
this.archive = new ExplodedArchive(this.rootFolder);
|
||||
jarFile.close();
|
||||
}
|
||||
|
||||
private void copy(InputStream in, OutputStream out) throws IOException {
|
||||
@@ -141,6 +140,7 @@ public class ExplodedArchiveTests {
|
||||
new URL[] { filteredArchive.getUrl() });
|
||||
assertThat(classLoader.getResourceAsStream("1.dat").read(), equalTo(1));
|
||||
assertThat(classLoader.getResourceAsStream("2.dat"), nullValue());
|
||||
classLoader.close();
|
||||
}
|
||||
|
||||
private Map<String, Archive.Entry> getEntriesMap(Archive archive) {
|
||||
|
||||
@@ -34,8 +34,6 @@ import org.junit.rules.ExpectedException;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.springframework.boot.loader.TestJarCreator;
|
||||
import org.springframework.boot.loader.data.RandomAccessDataFile;
|
||||
import org.springframework.boot.loader.jar.JarEntryFilter;
|
||||
import org.springframework.boot.loader.jar.RandomAccessJarFile;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
@@ -75,6 +73,7 @@ public class RandomAccessJarFileTests {
|
||||
public void createFromFile() throws Exception {
|
||||
RandomAccessJarFile jarFile = new RandomAccessJarFile(this.rootJarFile);
|
||||
assertThat(jarFile.getName(), notNullValue(String.class));
|
||||
jarFile.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -83,6 +82,7 @@ public class RandomAccessJarFileTests {
|
||||
this.rootJarFile, 1);
|
||||
RandomAccessJarFile jarFile = new RandomAccessJarFile(randomAccessDataFile);
|
||||
assertThat(jarFile.getName(), notNullValue(String.class));
|
||||
jarFile.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user