Semantic provided for RuntimeException is against java guideline in rule java:112

Your description for RuntimeException(unchecked exceptions) is not accurate in rule s112.

is telling following:

" Throwing generic exceptions such as Error, RuntimeException, Throwable, and Exception will have a negative impact on any code trying to catch these exceptions.

From a consumer perspective, it is generally a best practice to only catch exceptions you intend to handle."

If you will check official documentation supplied for RuntimeException or any other java unchecked exception, on official site:

Description for RuntimeException is following:

“Runtime exceptions represent problems that are the result of a programming problem, and as such, the API client code cannot reasonably be expected to recover from them or to handle them in any way.”

You telling that RuntimeException are intended to be handled, however official Java documentation tells that it is not - so there is a contradiction between official Java unchecked exception semantic, and description you providing, as result your rule provides wrong suggestion how to define unchecked exception in the code.

From coding perspective it is common practice to wrap checked into runtime exception to stop operation execution if operation cannot recover from checked exception, and there is no proper way to handle in the code and just to return an error to user

try {
// some code goes here
} catch(IOException ex) {
    throw new RuntimeException(ex);

Hi @Dmytro_Brazhnyk,

Thank you for reporting!

After some reading and investigation, I can see why you are seeing an issue here.
First, if you read both the rule description and Java documentation as a whole, you will understand it refers to the same thing. Excluding only one sentence can remove the context and real meaning of the text.
Second, in the rule description, you can find two links, CWE and CERT standards, which also support what has been written in the rule. Feel free to have a look.

I hope this helps!

All the best,