forked from phoedos/pmd
parent
c4e0586dd4
commit
c2b18ce229
@ -368,6 +368,7 @@ Language specific fixes:
|
||||
* java-codestyle
|
||||
* [#1208](https://github.com/pmd/pmd/issues/1208): \[java] PrematureDeclaration rule false-positive on variable declared to measure time
|
||||
* [#1429](https://github.com/pmd/pmd/issues/1429): \[java] PrematureDeclaration as result of method call (false positive)
|
||||
* [#1480](https://github.com/pmd/pmd/issues/1480): \[java] IdenticalCatchBranches false positive
|
||||
* [#1673](https://github.com/pmd/pmd/issues/1673): \[java] UselessParentheses false positive with conditional operator
|
||||
* [#1790](https://github.com/pmd/pmd/issues/1790): \[java] UnnecessaryFullyQualifiedName false positive with enum constant
|
||||
* [#1918](https://github.com/pmd/pmd/issues/1918): \[java] UselessParentheses false positive with boolean operators
|
||||
|
@ -126,4 +126,23 @@ class Foo {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description>[java] IdenticalCatchBranches false positive #1480</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
class Foo {
|
||||
public boolean classNameExists(String fullyQualifiedClassName) {
|
||||
try {
|
||||
Foo.class.getClassLoader().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;
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
Loading…
x
Reference in New Issue
Block a user