[ https://issues.apache.org/jira/browse/LANG-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803326#comment-17803326 ]
Gary D. Gregory commented on LANG-1726: --------------------------------------- What do you think the comment should read? > 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)