Hi to all,
I'm continuing to look at Pivot sources (just updated), try to
following suggestions given to me from FindBugs, but focusing only on
its "High Priority" Bugs:

I've found many things like this (approx 6 in charts, and 18 / 20 in wtk):
CalendarButton.java:168 Comparison of String parameter using == or !=
This is the  code:

    public void setSelectedDateKey(String selectedDateKey) {
        String previousSelectedDateKey = this.selectedDateKey;

        if (previousSelectedDateKey != selectedDateKey) {
            this.selectedDateKey = selectedDateKey;
            calendarButtonListeners.selectedDateKeyChanged(this,
                previousSelectedDateKey);
        }
    }


What do you think on an utility class (like StringUtils) to put an
utility static method to do these tests (with checks for null, etc),
and maybe under pivot.util, under core ?


Another interesting thing noted is this:
pivot/wtk/ApplicationContext.java:1201
pivot.wtk.ApplicationContext.resourceCache is or uses a map or set of
URLs, which can be a performance hog
Reading better what they explain, this could be useful to fix, but
changing from URL to URI (as they suggest) is ok in the class, but
gives compilation error in other 24 classes under wtk. What do you
think ?
Leave as is and review later, change to URI, or other ...


Then, there are other but secondary at the moment, while there are
many others as "Normal Priority", but these doesn't interest me at the
moment ...


Until the deadline of tomorrow i could help to fix some of them, tell me.


Thanks,
Sandro

Reply via email to