diff --git a/.travis.yml b/.travis.yml index c0f28cf..3b60663 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,2 @@ language: java -jdk: oraclejdk8 +jdk: oraclejdk9 diff --git a/pom.xml b/pom.xml index ab9fffd..2e6824a 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ https://github.com/rzymek/opczip - ${project.url} + https://github.com/rzymek/opczip @@ -32,15 +32,15 @@ - 1.8 - 1.8 + UTF-8 + 8 org.junit.jupiter junit-jupiter-engine - 5.6.0 + 5.7.1 test @@ -52,13 +52,13 @@ org.assertj assertj-core - 3.15.0 + 3.19.0 test org.junit.jupiter junit-jupiter-params - 5.7.0-M1 + 5.7.1 test @@ -70,7 +70,7 @@ org.openjdk.jmh jmh-generator-annprocess - 1.23 + 1.29 test @@ -78,16 +78,37 @@ maven-surefire-plugin - 2.22.0 + 3.0.0-M5 + + + --add-opens com.github.rzymek.opczip/com.github.rzymek.opczip=ALL-UNNAMED + --add-opens com.github.rzymek.opczip/com.github.rzymek.opczip.reader=ALL-UNNAMED + + org.apache.maven.plugins maven-compiler-plugin - 3.8.0 - - 8 - 8 - + 3.8.1 + + + default-compile + + 9 + + + + base-compile + + compile + + + + module-info.java + + + + @@ -100,7 +121,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.2.1 attach-sources @@ -113,7 +134,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 + 3.2.0 attach-javadocs @@ -140,7 +161,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.8 true ossrh diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..da9f3e4 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,5 @@ +module com.github.rzymek.opczip { + exports com.github.rzymek.opczip; + exports com.github.rzymek.opczip.reader; + exports com.github.rzymek.opczip.reader.skipping; +} diff --git a/src/test/java/com/github/rzymek/opczip/reader/FileListTest.java b/src/test/java/com/github/rzymek/opczip/reader/FileListTest.java index aea00ec..a0e1aa3 100644 --- a/src/test/java/com/github/rzymek/opczip/reader/FileListTest.java +++ b/src/test/java/com/github/rzymek/opczip/reader/FileListTest.java @@ -9,9 +9,13 @@ import java.io.IOException; import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.*; import java.util.stream.Stream; -import java.util.stream.StreamSupport; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -86,26 +90,16 @@ private InputStream open(String filename) { @Override public Stream provideArguments(ExtensionContext extensionContext) { - InputStream resource = FileListTest.class.getResourceAsStream(XLSX_DIR); - Scanner scanner = new Scanner(resource); - return StreamSupport.stream( - Spliterators.spliteratorUnknownSize(new Iterator() { - @Override - public boolean hasNext() { - boolean hasNext = scanner.hasNext(); - if (!hasNext) { - scanner.close(); - } - return hasNext; - } - - @Override - public Arguments next() { - return Arguments.of(scanner.nextLine()); - } - }, Spliterator.ORDERED), - false - ); + try { + URI resource = FileListTest.class.getResource(XLSX_DIR).toURI(); + Path path = Paths.get(resource); + return Files.list(path) + .map(Path::getFileName) + .map(Path::toString) + .map(Arguments::of); + } catch (URISyntaxException | IOException ex) { + throw new IllegalStateException(ex); + } } @FunctionalInterface