A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4873 below:

Can no longer suppress on the exception itself · Issue #4873 · pmd/pmd · GitHub

Affects PMD Version: 7.0.0

Rule: AvoidCatchingGenericException

Description:

try {
	someMethod();
} catch (@SuppressWarnings("PMD.AvoidCatchingGenericException") Exception exception) {
	...
}

This used to work on PMD 6.55.0. That is, it suppressed the PMD warning. It no longer works on 7.0.0 and I have to either put // NOPMD or put the suppression on the method.

Code Sample demonstrating the issue:

See above.

Steps to reproduce:

Have this code and run PMD on it.

Running PMD through: Gradle

Gradle 8.7, JDK 21.0.1, Linux.

P.S. Congratulations on the release!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4