#1438 UseNotifyAllInsteadOfNotify gives false positive

This commit is contained in:
Andreas Dangel
2015-11-19 21:35:50 +01:00
parent 90b1f65ea2
commit f2ec1be93f
3 changed files with 16 additions and 1 deletions

View File

@ -978,7 +978,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>