Prepare for release candidate
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e2748c9..1205cba 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -49,13 +49,13 @@
---------------
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
-+ Make sure you have a [GitHub account](https://github.com/signup/free).
++ Make sure you have a [GitHub account](https://github.com/signup/free). This is not essential, but makes providing patches much easier.
+ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons IO's scope.
+ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
+ Find the corresponding [repository on GitHub](https://github.com/apache/?query=commons-),
-[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository.
+[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository. If you don't have a GitHub account, you can still clone the Commons repository.
Making Changes
--------------
@@ -109,7 +109,6 @@
+ [General GitHub documentation](https://help.github.com/)
+ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ `#apache-commons` IRC channel on `irc.freenode.net`
[cla]:https://www.apache.org/licenses/#clas
[jira]:https://issues.apache.org/jira/browse/IO
diff --git a/README.md b/README.md
index ba8367f..3cc19b4 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@
[![Java CI](https://github.com/apache/commons-io/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/commons-io/actions/workflows/maven.yml)
[![Coverage Status](https://codecov.io/gh/apache/commons-io/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/commons-io)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/commons-io/commons-io/badge.svg?gav=true)](https://maven-badges.herokuapp.com/maven-central/commons-io/commons-io/?gav=true)
-[![Javadocs](https://javadoc.io/badge/commons-io/commons-io/2.15.1.svg)](https://javadoc.io/doc/commons-io/commons-io/2.15.1)
+[![Javadocs](https://javadoc.io/badge/commons-io/commons-io/2.16.0.svg)](https://javadoc.io/doc/commons-io/commons-io/2.16.0)
[![CodeQL](https://github.com/apache/commons-io/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/commons-io/actions/workflows/codeql-analysis.yml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/apache/commons-io/badge)](https://api.securityscorecards.dev/projects/github.com/apache/commons-io)
@@ -70,7 +70,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>2.15.1</version>
+ <version>2.16.0</version>
</dependency>
```
@@ -112,7 +112,6 @@
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/IO)
+ [Apache Commons Slack Channel](https://the-asf.slack.com/archives/C60NVB8AD)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
-+ `#apache-commons` IRC channel on `irc.freenode.org`
Apache Commons Components
-------------------------
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 5effc12..bee4fb0 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,4 +1,144 @@
+Apache Commons IO 2.16.0 Release Notes
+
+Introduction
+------------
+
+Commons IO is a package of Java utility classes like java.io.
+Classes in this package are considered to be so standard and of such high
+reuse as to justify existence in java.io.
+
+The Apache Commons IO library contains utility classes, stream implementations, file filters,
+file comparators, endian transformation classes, and much more.
+
+Java 8 is required.
+
+New features
+------------
+
+o Add and use PathUtils.getFileName(Path, Function<Path, R>). Thanks to Gary Gregory.
+o Add and use PathUtils.getFileNameString(). Thanks to Gary Gregory.
+o Make public Erase.rethrow(Throwable). Thanks to Gary Gregory.
+o IO-826: Add BrokenInputStream.BrokenInputStream(Throwable). Thanks to markslater, Gary Gregory.
+o IO-826: Add BrokenReader.BrokenReader(Throwable). Thanks to markslater, Gary Gregory.
+o IO-826: Add BrokenOutputStream.BrokenOutputStream(Throwable). Thanks to markslater, Gary Gregory.
+o IO-826: Add BrokenWriter.BrokenWriter(Throwable). Thanks to markslater, Gary Gregory.
+o Add BoundedInputStream.getRemaining(). Thanks to Gary Gregory.
+o Add FileTimes.toNtfsTime(long). Thanks to Gary Gregory.
+o Add FileTimes.fromUnixTime(long). Thanks to Gary Gregory.
+o Add FileTimes.isUnixTime(FileTime). Thanks to Gary Gregory.
+o Add FileTimes.isUnixTime(long). Thanks to Gary Gregory.
+o Add FileTimes.toUnixTime(FileTime). Thanks to Gary Gregory.
+o Add BrokenInputStream.Builder. Thanks to Gary Gregory.
+o Add PathUtils.getExtension(Path). Thanks to Gary Gregory.
+o Add PathUtils.getBaseName(Path). Thanks to Gary Gregory.
+o Add ThrottledInputStream. Thanks to Gary Gregory.
+o Add IORunnable.noop(). Thanks to Gary Gregory.
+o Add ChecksumInputStream and test #548. Thanks to Gary Gregory.
+o Add AbstractStreamBuilder.getReader(). Thanks to Gary Gregory.
+o Add Maven property project.build.outputTimestamp for build reproducibility. Thanks to Gary Gregory.
+o Add ProxyInputStream.unwrap(). Thanks to Gary Gregory.
+o Add a running count and builder to BoundedInputStream. Thanks to Gary Gregory.
+
+Fixed Bugs
+----------
+
+o Fix and re-enable testSkip_RequiredCharsets #518. Thanks to Elliotte Rusty Harold.
+o IO-824: SymbolicLineFileFilter documentation fixes. Thanks to Miguel Munoz, Gary Gregory.
+o IO-795: CharSequenceInputStream.reset() only works once #520. Thanks to Miguel Munoz, Gary Gregory.
+o IO-795: Finish TODO on CharSequenceInputStream #540. Thanks to Elliotte Rusty Harold.
+o IO-825: Add byte array size validation for methods in EndianUtils #521. Thanks to Arthur Chan, Gary Gregory.
+o IO-825: Add missing test case CircularByteBufferTest. Thanks to dkdal, Gary Gregory.
+o IO-781: Make CharSequenceInputStream.available() more correct in the face of multibyte encodings #525. Thanks to Elliotte Rusty Harold.
+o IO-781: Remove unreachable code in AbstractIOFileFilterTest #526. Thanks to Elliotte Rusty Harold.
+o IO-808: Rationalize and unify checking for existence of files and directories #529. Thanks to Elliotte Rusty Harold.
+o Avoid NullPointerException in IOCase.checkEquals(String, String) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanExecuteFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanExecuteFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanReadFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanReadFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanWriteFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in CanWriteFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in DirectoryFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in DirectoryFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in EmptyFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in EmptyFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in FileFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in FileFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in HiddenFileFilter.accept(File) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in HiddenFileFilter.accept(Path, BasicFileAttributes) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in IOCase.checkIndexOf(String, int, String) on null input. Thanks to Gary Gregory.
+o Avoid NullPointerException in IOCase.checkRegionMatches(String, int, String) on null input. Thanks to Gary Gregory.
+o BoundedInputStream.getCount() should not count EOF. Thanks to Gary Gregory.
+o Modernize temporary file creation and deletion in DeferredFileOutputStreamTest #535. Thanks to Elliotte Rusty Harold, Gary Gregory.
+o Add PathMatcher to IOFileFilter class Javadoc #536. Thanks to Elliotte Rusty Harold.
+o IO-781: Fix CharSequenceInputStream coding exception handling #537. Thanks to Marcono1234.
+o IO-781: Deprecate int CountingInputStream#getCount() in favor of long CountingInputStream#getByteCount(). Thanks to Marcono1234.
+o IO-828: Deprecate CountingInputStream.resetCount() in favor of resetByteCount(). Thanks to Elliotte Rusty Harold, Gary Gregory.
+o IO-828: Deprecate CountingInputStream.getMaxLength() in favor of getMaxCount()). Thanks to Gary Gregory.
+o IO-818: NullInputStream breaks InputStream's read method contract. Thanks to Gary Gregory.
+o Javadoc shouldn't reference 1.x behavior #539. Thanks to Elliotte Rusty Harold.
+o IO-829: Don't decode and reencode characters in a potentially different charset in AbstractOrigin.CharSequenceOrigin.getReader(Charset). Thanks to Elliotte Rusty Harold, Gary Gregory.
+o Let subclasses of CountingInputStream.afterRead(int) throw IOException. Thanks to Gary Gregory.
+o IO-807: Characterization test for broken symlinks when copying directories #547. Thanks to Elliotte Rusty Harold, Gary Gregory.
+o ClosedInputStream.read(byte[], int, int) does not always return -1. Thanks to Gary Gregory.
+o ClosedOutputStream.write(byte[], int, int) does not always throw IOException. Thanks to Gary Gregory.
+o XmlStreamReader can't parse an XML document with a multi-line prolog #550. Thanks to Sylwester Lachiewicz, Gary Gregory.
+o XmlStreamReader can't parse XML an document with an external parsed entity prolog. Thanks to Andreas Hubold, Gary Gregory.
+o IO-836: Update FileNameUtils Javadoc #554. Thanks to Elliotte Rusty Harold.
+o IO-807: Copy symlinks, not the files the symlinks point to #558. Thanks to Jordi Sola, Elliotte Rusty Harold.
+o Pickup apache-rat-plugin version from parent POM. Thanks to Gary Gregory.
+o Add test for copying a symlink FileUtilsTest#testCopyFile_symLink() #564. Thanks to Elliotte Rusty Harold.
+o Make copyFile copy symbolic links by value rather than reference #565. Thanks to Elliotte Rusty Harold.
+o Deprecate CopyUtils 0-argument constructor. Thanks to Gary Gregory.
+o IO-843: Deprecate EndianUtils 0-argument constructor. Thanks to Gary Gregory, Elliotte Rusty Harold.
+o Deprecate FileSystemUtils 0-argument constructor. Thanks to Gary Gregory.
+o Deprecate FilenameUtils 0-argument constructor. Thanks to Gary Gregory.
+o Deprecate RandomAccessFiles 0-argument constructor. Thanks to Gary Gregory.
+o Clarify and correct EndianUtils and SwappedDataInputStream API doc #566. Thanks to Elliotte Rusty Harold, Gary Gregory.
+o Add characterization test for copying a symlinked directory #570. Thanks to Elliotte Rusty Harold.
+o RandomAccessFileInputStream.builder().get() now throws ISE instead of NPE. Thanks to Gary Gregory.
+o IO-845: Test links to targets outside the source directory #571. Thanks to Elliotte Rusty Harold.
+o Focus Javadoc on current version rather than past versions #573, #574. Thanks to Elliotte Rusty Harold.
+o IO-469: "Self-suppression not permitted" while using BrokenOutput and BrokenInput streams with try-with-resources. Thanks to Grigory Fadeev, Kristian Rosenvold, Elliotte Rusty Harold.
+o IO-405: Handle zero and negative thresholds #587. Thanks to Elliotte Rusty Harold.
+o Deprecate CountingInputStream in favor of BoundedInputStream. Thanks to Gary Gregory.
+o PathUtils.setPosixPermissions(...) only sets permissions if needed. Thanks to Gary Gregory.
+o PathUtils.setReadOnly(...) only sets permissions if needed. Thanks to Gary Gregory.
+o PathUtils.deleteFile(..., DeleteOption...) only sets permissions if needed. Thanks to Gary Gregory.
+o CleaningPathVisitor only sets permissions if needed. Thanks to Gary Gregory.
+o DeletingPathVisitor only sets permissions if needed. Thanks to Gary Gregory.
+
+Changes
+-------
+
+o Bump commons.bytebuddy.version from 1.14.10 to 1.14.12 #534, #592. Thanks to Gary Gregory.
+o Bump org.apache.commons:commons-parent from 65 to 67. Thanks to Gary Gregory.
+o Bump commons-codec:commons-codec from 1.16.0 to 1.16.1 #583. Thanks to Dependabot.
+o Bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 3.2.0 #593. Thanks to Dependabot.
+
+
+Commons IO 2.7 and up requires Java 8 or above.
+Commons IO 2.6 requires Java 7 or above.
+Commons IO 2.3 through 2.5 requires Java 6 or above.
+Commons IO 2.2 requires Java 5 or above.
+Commons IO 1.4 requires Java 1.3 or above.
+
+Historical list of changes: https://commons.apache.org/proper/commons-io/changes-report.html
+
+For complete information on Apache Commons IO, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Commons IO website:
+
+https://commons.apache.org/proper/commons-io/
+
+Download page: https://commons.apache.org/proper/commons-io/download_io.cgi
+
+Have fun!
+-Apache Commons Team
+
+------------------------------------------------------------------------------
+
+
Apache Commons IO
Version 2.15.1
Release Notes
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 91700dd..b72a82b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,7 +46,7 @@
<title>Apache Commons IO Release Notes</title>
</properties>
<body>
- <release version="2.16.0" date="202Y-MM-DD" description="Java 8 is required.">
+ <release version="2.16.0" date="2024-03-25" description="Java 8 is required.">
<!-- Fix -->
<action dev="ggregory" type="fix" due-to="Elliotte Rusty Harold">Fix and re-enable testSkip_RequiredCharsets #518.</action>
<action dev="ggregory" type="fix" issue="IO-824" due-to="Miguel Munoz, Gary Gregory">SymbolicLineFileFilter documentation fixes.</action>
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
index 6c02743..66b4137 100644
--- a/src/changes/release-notes.vm
+++ b/src/changes/release-notes.vm
@@ -15,11 +15,10 @@
## specific language governing permissions and limitations
## under the License.
-Apache Commons IO
-Version ${version}
-Release Notes
+Apache Commons IO ${version} Release Notes
-INTRODUCTION:
+Introduction
+------------
Commons IO is a package of Java utility classes like java.io.
Classes in this package are considered to be so standard and of such high
@@ -40,14 +39,14 @@
#if ($release.getActions().size() == 0)
No changes defined in this version.
#else
-Changes in this version include:
-
## indent to be used if there is no issue attribute.
## should be the same as the indent in the changes.xml file
-## less 2 spaces for the 'o' and trailing space
-#set($indent=' ')
+## less 2 spaces for the '*' and trailing space
+#set($indent=' ')
#if ($release.getActions('add').size() !=0)
-New features:
+New features
+------------
+
#foreach($actionItem in $release.getActions('add'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
@@ -70,7 +69,9 @@
#end
#if ($release.getActions('fix').size() !=0)
-Fixed Bugs:
+Fixed Bugs
+----------
+
#foreach($actionItem in $release.getActions('fix'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
@@ -93,7 +94,9 @@
#end
#if ($release.getActions('update').size() !=0)
-Changes:
+Changes
+-------
+
#foreach($actionItem in $release.getActions('update'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
@@ -116,7 +119,9 @@
#end
#if ($release.getActions('remove').size() !=0)
-Removed:
+Removed
+-------
+
#foreach($actionItem in $release.getActions('remove'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
@@ -140,10 +145,6 @@
## End of main loop
#end
##
-Compatibility with 2.6:
-Binary compatible: Yes.
-Source compatible: Yes.
-Semantic compatible: Yes.
Commons IO 2.7 and up requires Java 8 or above.
Commons IO 2.6 requires Java 7 or above.
@@ -163,4 +164,5 @@
Have fun!
-Apache Commons Team
-==============================================================================
+------------------------------------------------------------------------------
+
diff --git a/src/site/xdoc/download_io.xml b/src/site/xdoc/download_io.xml
index 4d370c2..dc8309f 100644
--- a/src/site/xdoc/download_io.xml
+++ b/src/site/xdoc/download_io.xml
@@ -113,32 +113,32 @@
</p>
</subsection>
</section>
- <section name="Apache Commons IO 2.15.1 (requires Java 8)">
+ <section name="Apache Commons IO 2.16.0 (requires Java 8)">
<subsection name="Binaries">
<table>
<tr>
- <td><a href="[preferred]/commons/io/binaries/commons-io-2.15.1-bin.tar.gz">commons-io-2.15.1-bin.tar.gz</a></td>
- <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.15.1-bin.tar.gz.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.15.1-bin.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/io/binaries/commons-io-2.16.0-bin.tar.gz">commons-io-2.16.0-bin.tar.gz</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.16.0-bin.tar.gz.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.16.0-bin.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/io/binaries/commons-io-2.15.1-bin.zip">commons-io-2.15.1-bin.zip</a></td>
- <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.15.1-bin.zip.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.15.1-bin.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/io/binaries/commons-io-2.16.0-bin.zip">commons-io-2.16.0-bin.zip</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.16.0-bin.zip.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/binaries/commons-io-2.16.0-bin.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
<subsection name="Source">
<table>
<tr>
- <td><a href="[preferred]/commons/io/source/commons-io-2.15.1-src.tar.gz">commons-io-2.15.1-src.tar.gz</a></td>
- <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.15.1-src.tar.gz.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.15.1-src.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/io/source/commons-io-2.16.0-src.tar.gz">commons-io-2.16.0-src.tar.gz</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.16.0-src.tar.gz.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.16.0-src.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/io/source/commons-io-2.15.1-src.zip">commons-io-2.15.1-src.zip</a></td>
- <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.15.1-src.zip.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.15.1-src.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/io/source/commons-io-2.16.0-src.zip">commons-io-2.16.0-src.zip</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.16.0-src.zip.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/commons/io/source/commons-io-2.16.0-src.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>