Peter Verhas created LANG-1482: ---------------------------------- Summary: Functions Key: LANG-1482 URL: https://issues.apache.org/jira/browse/LANG-1482 Project: Commons Lang Issue Type: Bug Components: lang.* Reporter: Peter Verhas Fix For: 3.10
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 these methods are missing (except for the one {{asRunnable()}). -- This message was sent by Atlassian Jira (v8.3.2#803003)