Skip to content

Commit

Permalink
[java] DataflowAnomalyAnalysis - add test case for pmd#1749
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Jul 22, 2019
1 parent 56b1bfb commit f9bb5b8
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,23 @@ class Test{
Test2 test = new Test2() ;
if( t1 == (t1 = test.simpleTest(t1))) ;
}
}
]]></code>
</test-code>

<test-code>
<description>#1749 DD False Positive in DataflowAnomalyAnalysis</description>
<expected-problems>1</expected-problems>
<expected-linenumbers>4</expected-linenumbers>
<expected-messages>
<message>Found 'DU'-anomaly for variable 'a' (lines '4'-'5').</message>
</expected-messages>
<code><![CDATA[
public class Test {
public void test(){
int a = 0;
a = a + 3;
}
}
]]></code>
</test-code>
Expand Down

0 comments on commit f9bb5b8

Please sign in to comment.