False +: ImmutableFieldRule with static inner class
A source code analyzer
Brought to you by:
adangel,
juansotuyo
Hi the following code is flagged as violating
ImmutableFieldRule.
count should not be final, this is a false +
package com.premier.cims.sbl.external.finance.pcr;
public class CStatic {
//~ Constructors ------
public CStatic() {
}
//~ Methods
public InnerStuff callMe() {
InnerStuff stuff = new InnerStuff();
stuff.count = 5;
return stuff;
}
public static class InnerStuff {
private int count = 0;
public int getCount() {
return count;
}
}
}
Logged In: YES
user_id=358115
Tom,
Any progress on this one also?
Many thanks
Benoit
Logged In: YES
user_id=5159
Hi Benoit -
This appears to have been fixed in CVS at some point. You
can download an updated pmd-3.2 jar file from here:
http://infoether.com/~tom/pmd-3.2.jar
that should work.
Thanks,
Tom