Thomas Mueller wrote:
Hi,

I like FindBugs, and it would be great to have a good configuration in
subversion.
The same for PMD and Checkstyle. People can then use it or not, but
don't have to duplicate the setup.

Integer(int) constructor; use Integer.valueOf(int) instead

This is Java 1.5. But what you could do is:

Oops. Thanks for pointing this out. Will fix.

public class ObjectUtils {
    public static Integer getInteger(int x) {
        return new Integer(x); // NOPMD
    }
}

Then change the code so this method is called instead of creating
Integer objects directly. Then if we switch to JDK 1.5, of if we want
to build our own cache, we have to change it only there.

makes inefficient use of keySet iterator instead of entrySet iterator

This should be changed if possible.

Best regards, Julian

Reply via email to