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

Peter Verhas commented on LANG-1482:
------------------------------------

You cannot find it, because it is not there. This is related to a modification 
change that was developed (in a wrong style btw, hence this ticket) and not yet 
merged. Also have alook at the pull request:

https://github.com/apache/commons-lang/pull/448

I created to fix the implementation and also adding some more tests as the 
original developer did not cover all new code with test.

> Functions 
> ----------
>
>                 Key: LANG-1482
>                 URL: https://issues.apache.org/jira/browse/LANG-1482
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>            Reporter: Peter Verhas
>            Priority: Minor
>             Fix For: 3.10
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The implementation of the methods {{asRunnable()}}, {{asConsumer()}}, 
> {{asCallable()}}, {{asBiConsumer()}} etc. is redundant and copy-paste. They 
> are implemented with the structure (example from {{asRunnable()}}:
> {code}
> return () -> {
>             try {
>                 pRunnable.run();
>             } catch (Throwable t) {
>                 throw rethrow(t);
>             }
>         };
> {code}
> This try-catch structure is already implemented in the class and can be used 
> here simplifying the method to 
> {code}
> return () -> run(pRunnable);
> {code}
> Also, the tests for {{asPredicate()}} and {{asBiPredicate()}} are missing.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to