Update pmd-core/src/main/java/net/sourceforge/pmd/util/IOUtil.java

Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
This commit is contained in:
Andreas Dangel
2022-05-20 08:51:52 +02:00
committed by GitHub
parent 8fc4e7e1c9
commit c53a64c688

View File

@ -180,6 +180,13 @@ public final class IOUtil {
}
}
// The following methods are taken from Apache Commons IO.
// The dependency was removed from PMD 6 because it had a security issue,
// and upgrading was not possible without upgrading to Java 8.
// See https://github.com/pmd/pmd/pull/3968
// TODO PMD 7: consider bringing back commons-io and cleaning this class up.
public static void closeQuietly(Closeable closeable) {
try {
closeable.close();