You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/04/08 12:20:00 UTC

[jira] [Commented] (LUCENE-9911) enable ecjLint unusedExceptionParameter

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

ASF subversion and git services commented on LUCENE-9911:
---------------------------------------------------------

Commit 2971f311a2b4a9139e3a74edbe76b08bc0e288a3 in lucene's branch refs/heads/main from Robert Muir
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=2971f31 ]

LUCENE-9911: enable ecjLint unusedExceptionParameter (#70)

Fails the linter if an exception is swallowed (e.g. variable completely
unused).

If this is intentional for some reason, the exception can simply by
annotated with @SuppressWarnings("unused").

> enable ecjLint unusedExceptionParameter
> ---------------------------------------
>
>                 Key: LUCENE-9911
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9911
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> unusedExceptionParameter is a very useful check, as it detects if you catch an exception and do nothing with it at all.
> As a library, its important to preserve exceptions (e.g. chain the root cause, .addSuppressed, etc). This check helps prevent exceptions from getting swallowed inadvertently.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org