You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/07/28 02:56:00 UTC
[jira] [Updated] (LANG-1482) Functions
[ https://issues.apache.org/jira/browse/LANG-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated LANG-1482:
----------------------------------
Fix Version/s: 3.13.1
(was: 3.13.0)
> 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.13.1
>
> 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.20.10#820010)