[ 
https://issues.apache.org/jira/browse/IO-710?focusedWorklogId=543938&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543938
 ]

ASF GitHub Bot logged work on IO-710:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jan/21 00:40
            Start Date: 29/Jan/21 00:40
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on a change in pull request #195:
URL: https://github.com/apache/commons-io/pull/195#discussion_r566178127



##########
File path: src/main/java/org/apache/commons/io/FileUtils.java
##########
@@ -1232,12 +1233,16 @@ public static boolean deleteQuietly(final File file) {
             if (file.isDirectory()) {
                 cleanDirectory(file);
             }
+        } catch (final SecurityException sec) {

Review comment:
       I am -1 to this as it defeats the simple purpose off the method. 
   
   As an aside, and what makes it worse is that the change is not even 
documented in the Javadoc.
   
   I suppose the Javadoc could be improved to say that no `Exception`s are 
thrown as opposed to "exceptions".




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 543938)
    Time Spent: 20m  (was: 10m)

> Utilize java.io.UncheckedIOException, rethrow SecurityException
> ---------------------------------------------------------------
>
>                 Key: IO-710
>                 URL: https://issues.apache.org/jira/browse/IO-710
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.8.0
>            Reporter: Boris Unckel
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Some methods catch IOExceptions and rethrow them in other RuntimeException 
> based exceptions (IllegalStateException, IllegalArgumentException).
> The JRE offers a standard for this usecase: java.io.UncheckedIOException
> In one case a SecurityException would be hidden. This is awfull if you're 
> trying to find the right set of permissions to make the SecurityManager work. 
> The default must be to rethrow them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to