From: Dominik Stadler Date: Fri, 15 Sep 2017 18:39:18 +0000 (+0000) Subject: Update third party libs to latest versions X-Git-Tag: REL_4_0_0_FINAL~549 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb507440ed5087e223558b87e865eae9a93eb243;p=poi.git Update third party libs to latest versions Start updating build to Java 8 Set version to 4.0-beta1 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808472 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build.gradle b/build.gradle index 46be8f2e77..89b73e4a42 100644 --- a/build.gradle +++ b/build.gradle @@ -21,11 +21,11 @@ buildscript { dependencies { classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.2' // 2.x requires Gradle >=4 - classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1" + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5" } } -// Only add the plugin for Sonar if enabled as it requires Java 8 +// Only add the plugin for Sonar if enabled if (project.hasProperty('enableSonar')) { println 'Enabling Sonar support' apply plugin: "org.sonarqube" @@ -73,16 +73,16 @@ subprojects { // See https://github.com/melix/japicmp-gradle-plugin apply plugin: 'me.champeau.gradle.japicmp' - version = '3.18-beta1' + version = '4.0-beta1' ext { - japicmpversion = '3.15' + japicmpversion = '3.17' } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } - sourceCompatibility = 1.6 + sourceCompatibility = 1.8 repositories { mavenCentral() @@ -124,7 +124,7 @@ subprojects { } jacoco { - toolVersion = '0.7.8' + toolVersion = '0.7.9' } // ensure the build-dir exists @@ -198,9 +198,9 @@ project('ooxml') { compile 'org.apache.xmlbeans:xmlbeans:2.6.0' compile 'org.apache.commons:commons-collections4:4.1' compile 'org.apache.commons:commons-math3:3.6.1' - compile 'org.apache.santuario:xmlsec:2.0.6' - compile 'org.bouncycastle:bcpkix-jdk15on:1.54' - compile 'com.github.virtuald:curvesapi:1.04' + compile 'org.apache.santuario:xmlsec:2.1.0' + compile 'org.bouncycastle:bcpkix-jdk15on:1.58' + compile 'com.github.virtuald:curvesapi:1.05' // for ooxml-lite, should we move this somewhere else? compile 'junit:junit:4.12' @@ -212,9 +212,8 @@ project('ooxml') { testCompile 'junit:junit:4.12' testCompile project(path: ':main', configuration: 'tests') - // Keep using 1.15 until we switch to Java 7 - testCompile 'org.openjdk.jmh:jmh-core:1.15' - testCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.15' + testCompile 'org.openjdk.jmh:jmh-core:1.19' + testCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.19' } // TOOD: we should not duplicate this task in each project, but I did not figure out how to inject the artifactId for each project @@ -245,7 +244,7 @@ project('excelant') { sourceSets.test.java.srcDirs = ['../../src/excelant/testcases'] dependencies { - compile 'org.apache.ant:ant:1.9.4' + compile 'org.apache.ant:ant:1.10.1' compile project(':main') compile project(':ooxml') @@ -269,7 +268,7 @@ project('integrationtest') { sourceSets.test.java.srcDirs = ['../../src/integrationtest'] dependencies { - compile 'org.apache.ant:ant:1.9.4' + compile 'org.apache.ant:ant:1.10.1' compile project(':main') compile project(':ooxml') diff --git a/build.xml b/build.xml index 601361ef3c..ccd88d7e67 100644 --- a/build.xml +++ b/build.xml @@ -24,7 +24,7 @@ under the License. To build the documentation you will need to install forrest and set the FORREST_HOME environment variable. Forrest 0.5.1 required. - Since POI 3.11 you will need JDK 1.6 or newer to build POI. + Since POI 4.0 you will need JDK 1.8 or newer to build and run POI. Some people may find the tests hang when run through Ant. If this happens to you, try giving Ant some more memory when you run it, eg: @@ -40,7 +40,7 @@ under the License. The Apache POI project Ant build. - + @@ -54,8 +54,8 @@ under the License. - - + + - - - - + + + + - - - - + + + + @@ -183,19 +182,19 @@ under the License. value="${repository.m2}/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar"/> - - - - - - - - + + + + + + + + - + + value="${repository.m2}/maven2/com/github/virtuald/curvesapi/1.05/curvesapi-1.05.jar"/> @@ -204,10 +203,10 @@ under the License. value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0.jar"/> - - - - + + + + @@ -265,10 +264,10 @@ under the License. - - - - + + + + @@ -289,16 +288,8 @@ under the License. - - - - - - - + + @@ -314,8 +305,9 @@ under the License. - + + @@ -467,7 +459,7 @@ under the License. - + @@ -515,7 +507,6 @@ under the License. - var rel = ("REL_"+project.getProperty("version.id")).toUpperCase().replace(/\W/g,"_"); @@ -562,10 +553,14 @@ under the License. + + + + @@ -573,6 +568,9 @@ under the License. + + + @@ -581,6 +579,7 @@ under the License. + @@ -601,17 +600,22 @@ under the License. + + + + + + + + + + + + + + + - - - - - - - - - - @@ -861,8 +865,8 @@ under the License. - - Forking javac with max heap size ${ooxml.memory} + + Forking javac with max heap size ${ooxml.memory} - + @@ -2194,7 +2198,7 @@ under the License. - + @@ -2417,7 +2421,7 @@ under the License. - + @@ -2444,7 +2448,7 @@ under the License. ${lastUpdated} ]]> - + - + + @@ -2615,9 +2620,9 @@ under the License. - + - + diff --git a/osgi/build.xml b/osgi/build.xml index 35dd87bcca..18eab60806 100644 --- a/osgi/build.xml +++ b/osgi/build.xml @@ -26,7 +26,7 @@ under the License. - + diff --git a/src/integrationtest/build.xml b/src/integrationtest/build.xml index 6af90e77b5..89be8998aa 100644 --- a/src/integrationtest/build.xml +++ b/src/integrationtest/build.xml @@ -90,9 +90,9 @@ Before running this, you should execute the "assemble" target in the main build. - - - + + + @@ -125,7 +125,7 @@ Before running this, you should execute the "assemble" target in the main build. @@ -136,10 +136,10 @@ Before running this, you should execute the "assemble" target in the main build. - - - - + + + + @@ -149,7 +149,7 @@ Before running this, you should execute the "assemble" target in the main build. diff --git a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java index b3c1158b27..99a104ca80 100644 --- a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java @@ -232,23 +232,15 @@ public class NPOIFSFileSystem extends BlockStore // Now process the various entries readCoreContents(); - } catch(IOException e) { - // Until we upgrade to Java 7, and can do a MultiCatch, we - // need to keep these two catch blocks in sync on their cleanup - if (closeChannelOnError && channel != null) { - channel.close(); - channel = null; - } - throw e; - } catch(RuntimeException e) { - // Comes from Iterators etc. - // TODO Decide if we can handle these better whilst - // still sticking to the iterator contract + } catch(IOException | RuntimeException e) { + // Comes from Iterators etc. + // TODO Decide if we can handle these better whilst + // still sticking to the iterator contract if (closeChannelOnError && channel != null) { channel.close(); channel = null; } - throw e; + throw e; } } diff --git a/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java b/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java index 921f749df6..a0a1990895 100644 --- a/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java +++ b/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java @@ -28,6 +28,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.zip.ZipEntry; diff --git a/src/ooxml/java/org/apache/poi/POIXMLDocument.java b/src/ooxml/java/org/apache/poi/POIXMLDocument.java index f496a7663b..9cba7545e9 100644 --- a/src/ooxml/java/org/apache/poi/POIXMLDocument.java +++ b/src/ooxml/java/org/apache/poi/POIXMLDocument.java @@ -39,7 +39,6 @@ import org.apache.xmlbeans.impl.common.SystemCache; /** * This holds the common functionality for all POI OOXML Document classes. */ -// TODO: implements AutoCloseable in Java 7+ when POI drops support for Java 6. public abstract class POIXMLDocument extends POIXMLDocumentPart implements Closeable { public static final String DOCUMENT_CREATOR = "Apache POI";