-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade commons-io from 2.15.1 to 2.16.1 #513
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #513 +/- ##
============================================
- Coverage 80.76% 80.73% -0.04%
- Complexity 6801 6828 +27
============================================
Files 348 348
Lines 24945 25051 +106
Branches 4029 4035 +6
============================================
+ Hits 20148 20224 +76
- Misses 3269 3296 +27
- Partials 1528 1531 +3 ☔ View full report in Codecov by Sentry. |
@madrob |
@madrob |
@madrob |
https://issues.apache.org/jira/browse/COMPRESS-675 has been addressed. |
@madrob |
@madrob |
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
- Migrate to non-deprecated code - Thanks to madrob Mike Drob and PR 513 - https://github.com/apache/commons-compress/pull/513/files
I've brought in most of this PR in several commits. If you rebase on git master, you should see the following remaining changes which are not merged: diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
index b138c4e..aef689a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
@@ -37,8 +37,8 @@
import org.apache.commons.compress.archivers.zip.ZipEncoding;
import org.apache.commons.compress.archivers.zip.ZipEncodingHelper;
import org.apache.commons.compress.utils.ArchiveUtils;
-import org.apache.commons.compress.utils.BoundedInputStream;
import org.apache.commons.compress.utils.IOUtils;
+import org.apache.commons.io.input.BoundedInputStream;
/**
* The TarInputStream reads a UNIX tar archive as an InputStream. methods are provided to position at each successive entry in the archive, and the read each
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
index fb0ca76..c054cef 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
@@ -36,9 +36,9 @@
import org.apache.commons.compress.archivers.zip.ZipEncodingHelper;
import org.apache.commons.compress.utils.ArchiveUtils;
import org.apache.commons.compress.utils.BoundedArchiveInputStream;
-import org.apache.commons.compress.utils.BoundedInputStream;
import org.apache.commons.compress.utils.BoundedSeekableByteChannelInputStream;
import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
+import org.apache.commons.io.input.BoundedInputStream;
/**
* Provides random access to UNIX archives.
diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
index d134a65..967c77e 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/Archive.java
@@ -70,7 +70,7 @@
* Creates an Archive with streams for the input and output files. Note: If you use this method then calling {@link #setRemovePackFile(boolean)} will have
* no effect.
*
- * @param inputStream the input stream, preferably a {@link BoundedInputStream}. The bound can the the file size.
+ * @param inputStream the input stream, preferably a {@link BoundedInputStream}. The bound can be the file size.
* @param outputStream the JAR output stream.
* @throws IOException if an I/O error occurs
*/
@@ -99,7 +99,7 @@
public Archive(final String inputFileName, final String outputFileName) throws FileNotFoundException, IOException {
this.inputPath = Paths.get(inputFileName);
this.inputSize = Files.size(this.inputPath);
- this.inputStream = new BoundedInputStream(Files.newInputStream(inputPath), inputSize);
+ this.inputStream = BoundedInputStream.builder().setPath(inputPath).setMaxCount(inputSize).get();
this.outputStream = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(outputFileName)));
this.outputFileName = outputFileName;
this.closeStreams = true; I'm not sure these are correct as they propagate stream closure instead of called |
@madrob ? |
Currently uses the snapshot version, can update to full release when that is available.
Also closes #505