GitHub user BruceKuiLiu opened a pull request:

    https://github.com/apache/commons-io/pull/47

    Add an IfStatement to check the return value of lockFile.delete().

    This statement returns a value that is not checked.
    The return value should be checked since it can indicate an unusual or 
unexpected function execution.
    The statement returns false if the destination file could not be 
successfully deleted (rather than throwing an Exception).
    If you don't check the result, you won't notice if the statement signals an 
unexpected behavior by returning an atypical return value.
    
http://findbugs.sourceforge.net/bugDescriptions.html#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/commons-io master2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-io/pull/47.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #47
    
----
commit 83c39ae5001e579af89d34dc8dc9d72b302f453d
Author: Kui LIU <brucekui...@gmail.com>
Date:   2017-10-13T23:06:19Z

    Add an IfStatement to check the return value of lockFile.delete().
    
    This statement returns a value that is not checked.
    The return value should be checked since it can indicate an unusual or 
unexpected function execution.
    The statement returns false if the destination file could not be 
successfully deleted (rather than throwing an Exception).
    If you don't check the result, you won't notice if the statement signals an 
unexpected behavior by returning an atypical return value.
    
http://findbugs.sourceforge.net/bugDescriptions.html#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to