forked from phoedos/pmd
@ -344,6 +344,7 @@ Language specific fixes:
|
||||
* [#1205](https://github.com/pmd/pmd/issues/1205): \[java] Improve ConstantsInInterface message to mention alternatives
|
||||
* [#1212](https://github.com/pmd/pmd/issues/1212): \[java] Don't raise JUnitTestContainsTooManyAsserts on JUnit 5's assertAll
|
||||
* [#1422](https://github.com/pmd/pmd/issues/1422): \[java] JUnitTestsShouldIncludeAssert false positive with inherited @<!-- -->Rule field
|
||||
* [#1563](https://github.com/pmd/pmd/issues/1563): \[java] False positive ForLoopCanBeForeach
|
||||
* [#1565](https://github.com/pmd/pmd/issues/1565): \[java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ
|
||||
* [#1747](https://github.com/pmd/pmd/issues/1747): \[java] PreserveStackTrace false-positive
|
||||
* [#1969](https://github.com/pmd/pmd/issues/1969): \[java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class
|
||||
|
@ -409,4 +409,21 @@ public class Test {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description>#1563 FP with ForLoopCanBeForeach</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
import java.util.List;
|
||||
class X {
|
||||
private void fofo(List<Foo> mList) {
|
||||
for (int i = 0; i < mList.size(); i++) {
|
||||
mList.get(i).setIndex(i);
|
||||
}
|
||||
}
|
||||
interface Foo {
|
||||
void setIndex(int i);
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
Reference in New Issue
Block a user