forked from phoedos/pmd
@ -131,7 +131,7 @@ public class ArrayIsStoredDirectlyRule extends AbstractSunSecureRule {
|
||||
if (val == null) {
|
||||
continue;
|
||||
}
|
||||
ASTPrimarySuffix foo = se.getFirstDescendantOfType(ASTPrimarySuffix.class);
|
||||
ASTPrimarySuffix foo = e.getFirstDescendantOfType(ASTPrimarySuffix.class);
|
||||
if (foo != null && foo.isArrayDereference()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -175,6 +175,23 @@ public class NotificationPacket {
|
||||
this.message = new String(rawTypeData, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#468 False positive when qualifying with this</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
private final int[] a;
|
||||
|
||||
public Foo(int[] b) {
|
||||
this.a = new int[b.length];
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
this.a[i] = b[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
@ -71,6 +71,8 @@ Based on those metrics, rules like "GodClass" detection can be implemented more
|
||||
* [#487](https://github.com/pmd/pmd/pull/487): \[java] Fix typeresolution for anonymous extending object
|
||||
* java-controversial
|
||||
* [#408](https://github.com/pmd/pmd/issues/408): \[java] DFA not analyzing asserts
|
||||
* java-sunsecure
|
||||
* [#468](https://github.com/pmd/pmd/issues/468): \[java] ArrayIsStoredDirectly false positive
|
||||
* java-unnecessarycode
|
||||
* [#412](https://github.com/pmd/pmd/issues/412): \[java] java-unnecessarycode/UnnecessaryFinalModifier missing cases
|
||||
|
||||
|
Reference in New Issue
Block a user