[
https://issues.apache.org/jira/browse/LANG-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803316#comment-17803316
]
Václav Haisman commented on LANG-1726:
--------------------------------------
The change fixes my issue. But the wrong comment still remains:
https://github.com/apache/commons-lang/blob/adc70c15ce3d19f4d9d6c60956038e2aa14a60bd/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java#L125-L126
> ExceptionUtils.asRuntimeException is not a good replacement for deprecated
> ExceptionUtils.rethrow
> -------------------------------------------------------------------------------------------------
>
> Key: LANG-1726
> URL: https://issues.apache.org/jira/browse/LANG-1726
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.exception.*
> Affects Versions: 3.14.0
> Reporter: Václav Haisman
> Priority: Major
> Fix For: 3.15.0
>
>
> I have been doing pass over deprecated warning in our code and one of them is
> that {{org.apache.commons.lang3.exception.ExceptionUtils#rethrow}} is
> deprecated. Its comment says "Use asRuntimeException(Throwable)." However,
> {{asRuntimeException()}} is not a good replacement. It lacks the generic type
> parameter R that the rethrow method has. In fact, the comment that says...
> {noformat}
> Returns:
> Never actually returned, this generic type matches any type which the calling
> site requires. [..]
> {noformat}
> ...is lying.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)