You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
The rule sees an assignment to foo[ i ] and an add-assignment from foo[ i ].
The rule thinks it sees an assignment from foo[ i ] to foo[ i ].
Code Sample demonstrating the issue:
publicclassTest {
publicstaticvoidmain( String[] args ) {
double[] foo = newdouble[ 100 ];
doublebar = 0.0;
for ( inti = 0; i < exps.length; i++ ) {
doublevalue = Math.random();
foo[ i ] = Math.exp( value );
bar += foo[ i ];
}
}
}
Running PMD through: Eclipse Plugin 4.0.15
The text was updated successfully, but these errors were encountered:
Affects PMD Version: 5.8.0
Rule: AvoidArrayLoops
Description:
The rule sees an assignment to
foo[ i ]
and an add-assignment fromfoo[ i ]
.The rule thinks it sees an assignment from
foo[ i ]
tofoo[ i ]
.Code Sample demonstrating the issue:
Running PMD through: Eclipse Plugin 4.0.15
The text was updated successfully, but these errors were encountered: