[jira] Created: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

JIRA jira@apache.org
Allow Closure and CollectionUtils.forAllDo to throw Exception
-------------------------------------------------------------

                 Key: COLLECTIONS-313
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-313
             Project: Commons Collections
          Issue Type: Bug
          Components: Collection
    Affects Versions: 3.2
            Reporter: David J. M. Karlsen


It would be nice if Closure.execute and CollectionUtils.forAllDo would be allowed to throw Exceptions as the work inside of the Closure might very well throw exceptions

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/COLLECTIONS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated COLLECTIONS-313:
--------------------------------------

    Issue Type: Improvement  (was: Bug)

> Allow Closure and CollectionUtils.forAllDo to throw Exception
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-313
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-313
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: David J. M. Karlsen
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice if Closure.execute and CollectionUtils.forAllDo would be allowed to throw Exceptions as the work inside of the Closure might very well throw exceptions

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/COLLECTIONS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771583#action_12771583 ]

Brent Worden commented on COLLECTIONS-313:
------------------------------------------

In the past, I have created a closure implementation whose execute method delegates to an abstract method that allows throwing of exceptions.  The attached patch contains the implementation.  The benefit of using this closure extension is that it has no impact on the existing API and can be used in conjunction with all the existing functors.

If others agree with this approach I can commit it along with some test cases.

> Allow Closure and CollectionUtils.forAllDo to throw Exception
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-313
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-313
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: David J. M. Karlsen
>         Attachments: collections-313.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice if Closure.execute and CollectionUtils.forAllDo would be allowed to throw Exceptions as the work inside of the Closure might very well throw exceptions

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/COLLECTIONS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent Worden updated COLLECTIONS-313:
-------------------------------------

    Attachment: collections-313.txt

throwing closure

> Allow Closure and CollectionUtils.forAllDo to throw Exception
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-313
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-313
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: David J. M. Karlsen
>         Attachments: collections-313.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice if Closure.execute and CollectionUtils.forAllDo would be allowed to throw Exceptions as the work inside of the Closure might very well throw exceptions

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (COLLECTIONS-313) Allow Closure and CollectionUtils.forAllDo to throw Exception

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/COLLECTIONS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent Worden updated COLLECTIONS-313:
-------------------------------------

    Comment: was deleted

(was: throwing closure)

> Allow Closure and CollectionUtils.forAllDo to throw Exception
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-313
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-313
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: David J. M. Karlsen
>         Attachments: collections-313.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice if Closure.execute and CollectionUtils.forAllDo would be allowed to throw Exceptions as the work inside of the Closure might very well throw exceptions

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.