[ 
https://issues.apache.org/jira/browse/IO-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728744#comment-17728744
 ] 

Gary D. Gregory edited comment on IO-774 at 6/2/23 1:35 PM:
------------------------------------------------------------

Hello [~danblum] 

Thank you for your report. Would you please test with the current version 
2.12.0?

The attached class does not easily demonstrate anything:
 * It's not a unit test
 * There are ZERO comments or instructions on how to use it
 * When I run as is it I get:
{quote}Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
{quote}
 * If I try to guess and pass it one argument, a folder that does not exist 
like c:\tmp\test where c:\tmp\ exists but c:\tmp\test does not, I get:
{quote}Exception in thread "main" java.lang.NullPointerException
at FileUtilsTest.main(FileUtilsTest.java:32)
{quote}

Please provide a useable unit test or _something_ repeatable.
TY


was (Author: garydgregory):
Hello [~danblum] 

Thank you for your report.

The attached class does not easily demonstrate anything:
 * It's not a unit test
 * There are ZERO comments or instructions on how to use it
 * When I run as is it I get: 
{quote}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
{quote}
 * If I try to guess and pass it one argument, a folder that does not exist 
like c:\tmp\test where c:\tmp\ exists but c:\tmp\test does not, I get:
{quote}
Exception in thread "main" java.lang.NullPointerException
        at FileUtilsTest.main(FileUtilsTest.java:32)
{quote}

Please provide a useable unit test or _something_ repeatable.
TY


> FileUtils.forceDelete may silently not delete directories
> ---------------------------------------------------------
>
>                 Key: IO-774
>                 URL: https://issues.apache.org/jira/browse/IO-774
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.11.0
>         Environment: I am using CentOS 7 and Java 8.
>            Reporter: Daniel Blum
>            Priority: Minor
>         Attachments: FileUtilsTest.java
>
>
> Using Linux on NFS, if a file is in use and you delete it, the original file 
> is in fact deleted but a ".nfs" file will be left in the directory until the 
> thread or process using the file releases its handle. This prevents the 
> directory containing from being deleted. The upshot is that if forceDelete is 
> called on a directory and there is a file anywhere underneath it which 
> something has open, some of the tree will not be deleted with no exception 
> being thrown.
> I have attached a simple program which demonstrates the issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to