Join GitHub today
[java] DataflowAnomalyAnalysis: DD false positive for arrays #1251
Affects PMD Version: pmd 6.5.0 executed through maven-pmd-plugin 3.8
Rule: DataflowAnomalyAnalysis (DD false positive)
The variable 'msg2', which is declared as an array of BigInteger, is treated like a plain variable being assigned multiple times, while in fact assignments are to specific indexes of the array.
Code Sample demonstrating the issue:
final BigInteger msg2 = new BigInteger; msg2 = G1.modPow(x2, OtrCryptoEngine.MODULUS); BigInteger res = proofKnowLog(x2, 3); msg2 = res; msg2 = res; // etc.
Running PMD through: Maven