Affects PMD Version: 6.9.0
Rule: IdenticalCatchBranches
Description: False positive if only the return statement expression is different (true vs. false in the example below).
Code Sample demonstrating the issue:
public boolean classNameExists(String fullyQualifiedClassName) { try { pmdClassLoader.loadClass(fullyQualifiedClassName); return true; // Class found } catch (ClassNotFoundException e) { return false; } catch (LinkageError e2) { // Class exists, but may be invalid (see https://github.com/pmd/pmd/issues/1131) return true; } }Running PMD through: Maven
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