This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit 5c15d776b2ea82c4df72741873bb6833d4813de3 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Jul 29 17:00:36 2020 -0400 [VFS-779] Possible null pointer dereference in org.apache.commons.vfs2.impl.DefaultFileReplicator.close() due to return value of called method. Add missing changes.xml entry for new APIs. --- .../java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java | 9 ++++++--- src/changes/changes.xml | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java index f0b56e9..cdf9ff3 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java @@ -99,9 +99,12 @@ public class DefaultFileReplicator extends AbstractVfsComponent implements FileR } // Clean up the temp directory, if it is empty - if (tempDir != null && tempDir.exists() && tempDir.list().length == 0) { - tempDir.delete(); - tempDir = null; + if (tempDir != null && tempDir.exists()) { + final String[] list = tempDir.list(); + if (list != null && list.length == 0) { + tempDir.delete(); + tempDir = null; + } } } diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 30f0332..eb43269 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -53,6 +53,13 @@ The <action> type attribute can be add,update,fix,remove. <action issue="VFS-753" dev="ggregory" due-to="John Webb, Gary Gregory" type="fix"> NumberFormatException in SftpFileSystem::getUId. </action> + <action issue="VFS-779" dev="ggregory" due-to="Gary Gregory" type="fix"> + Possible null pointer dereference in org.apache.commons.vfs2.impl.DefaultFileReplicator.close() due to return value of called method. + </action> + <action dev="ggregory" due-to="Gary Gregory" type="fix"> + Add org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder.isDisableDetectExecChannel(FileSystemOptions) and setDisableDetectExecChannel(FileSystemOptions, boolean). + Add org.apache.commons.vfs2.FileSystemConfigBuilder.toBooleanObject(boolean). + </action> <action issue="VFS-754" dev="ggregory" due-to="Gary Gregory" type="update"> Update Apache Commons Compress from 1.19 to 1.20. </action>