My Blog

Welcome! What is this blog for/What will be blogged here? Well, frankly, only time will tell that ... ;-) The plan is to have stuff like ... what I plan to do/Interesting things that I want to share. My interests and hobbies ... and what I'm doing/not doing for it. Random thoughts/Opinions. Just about anything I feel like writing! have fun!

Tuesday, October 12, 2004

PMD Bug: False positive for modifier

Found a bug in PMD and submitted it - False +: UnusedModifier

The following Code gives a false positive:

public interface Test {

int size();

Test DFLT_IMPL = new Test() {
public int size() {
return 0;
}
};

}

PMD complains on the line "public int size() {" stating
"Avoid modifiers that are implied by context.

The method "size" in DFLT_IMPL must be declared public. So, I feel that the pmd message is a false positive.

I'm using -
Eclipse: 3.0.1
PMD Eclipse plugin:
PMD Core Engine Plugin: 1.9.0.v3
PMD UI Plugin: 2.0.6.v3

From my past experience, the PMD team have been very fast to respond. I had submitted a bug way back, I can't even recall what it was about. They fixed it pretty fast. In fact, they even mentioned my name in their credits page. I like that! :)

0 Comments:

Post a Comment

<< Home