Merge branch 'bug-1438'

This commit is contained in:
Andreas Dangel
2015-11-19 21:51:06 +01:00
3 changed files with 16 additions and 1 deletions

View File

@ -993,7 +993,7 @@ one is chosen. The thread chosen is arbitrary; thus its usually safer to call n
<value>
<![CDATA[
//StatementExpression/PrimaryExpression
[count(PrimarySuffix/Arguments/ArgumentList) = 0]
[PrimarySuffix/Arguments[@ArgumentCount = '0']]
[
PrimaryPrefix[./Name[@Image='notify' or ends-with(@Image,'.notify')]
or ../PrimarySuffix/@Image='notify'

View File

@ -79,4 +79,17 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description>#1438 UseNotifyAllInsteadOfNotify gives false positive</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class FlasePositive {
public static void main(String[] args) {
boolean notify;
notify = true;
}
}
]]></code>
</test-code>
</test-data>

View File

@ -30,6 +30,8 @@
* java-comments/CommentDefaultAccessModifier
* [#1430](https://sourceforge.net/p/pmd/bugs/1430/): CommentDefaultAccessModifier triggers on field
annotated with @VisibleForTesting
* java-design/UseNotifyAllInsteadOfNotify
* [#1438](https://sourceforge.net/p/pmd/bugs/1438/): UseNotifyAllInsteadOfNotify gives false positive
* java-finalizers/AvoidCallingFinalize
* [#1440](https://sourceforge.net/p/pmd/bugs/1440/): NPE in AvoidCallingFinalize
* java-optimizations/RedundantFieldInitializer