logo       

Re: [ 1608715 ] New Quick-Fixes for the eclipse plug-in: msg#00039

java.findbugs.general

Subject: Re: [ 1608715 ] New Quick-Fixes for the eclipse plug-in

You have to be very careful in suggesting quick fixes. More careful than
you are.

For example, your suggested fix for a useless self assignment is to remove
the statement containing the self assignment. That fix would almost certainly
be wrong and would obscure the actual error. For example, in:

class Foo {
int lowerBound, upperBound;
Foo(int LowerBound, int UpperBound) {
this.lowerBound = LowerBound;
this.upperBound = upperBound;
}
}

The assignment to this.upperBound is a useless self assignment. But
fixing it by removing the assignment is a horrible thing to do, since it wouldn't
fix the code and would hide the error.

If you want to implement a quick fix, you should first review a dozen occurrences of that
warning on production code, and determine if your solution would be the correct fix
to at least 10 of them. If not, suggesting the quick fix would be very ill advised.


Bill Pugh

On Dec 16, 2006, at 9:48 AM, <mbusarel@xxxxxx> <mbusarel@xxxxxx> wrote:

Hi Peter

We commited our reworked patch ([ 1616983 ] Quick-Fixes for the eclipse plug-in - Patch 02]).
In this path we fixed your issues and added some new Resolutions.

What you should know about the patch:

1) We renamed all classes (including the already existing) to XYZResolution.
-> Therefore the patch deletes everything in the .quickfix package and adds our new classes

2) We still didn't resolve the problem with the ExtensionPoint. This will be an issue for a future release.


We hope the patch satisfies your expectations.

Best regards
Marco & Thierry

_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise