apache / apache/lucene

Should we enable the check CheckedExceptionNotThrown in error prone?

Open
#16,545 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This check prevents methods that do not throw a specific exception to declare they do. I think this would be beneficial for Lucene as many method implementation declare they throw IOExceptions when they do not perform any IO making consumer of those methods to have to handle this exceptions when they shouldn't.

Change is trivial but it touches many files.

Contributor guide

Open the contributing guide

Research direction

Start by locating Lucene's Error Prone configuration and determine how the CheckedExceptionNotThrown check is enabled. Review the resulting diagnostics across the affected methods, remove declarations that no longer apply, and run the relevant build and test checks to confirm the project remains clean.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.