jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: [jira] Created: (JCR-1150) JCR2SPI: several performance improvements pointed out by Findbugs
Date Fri, 28 Sep 2007 12:56:46 GMT
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:

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.

Thomas

Mime
View raw message