I have no idea what fb-contrib is or how to disable it.
-kto
Bill Pugh wrote:
OK, so it seems this bug warning is coming from fb-contrib, not from the
detectors
includes with FindBugs.
Personally, I recommend disabling this detector.
Bill
On Sep 15, 2006, at 4:05 PM, Dave Brosius wrote:
<BugPattern type="RMC_REDUNDANT_METHOD_CALLS">
<ShortDescription>Method calls the same method on the same object
redundantly</ShortDescription>
<LongDescription>Method {1} calls the same method on the same
object
redundantly</LongDescription>
<Details>
<![CDATA[
<p>This method makes two consecutive calls to the same
method using
the same constant
parameters, on the same instance without any
intervening changes to
the objects. If this
method does not make changes to the object, which it
appears it
doesn't, then making
two calls is just a waste. These method calls could be
combined by
assigning the
result into a temporary, and using the temporary the
second time.
]]>
</Details>
</BugPattern>
-----Original Message-----
From: "Bill Pugh" <pugh@xxxxxxxxxx>
Sent: Fri, September 15, 2006 3:22 pm
To: "Kelly O'Hair" <Kelly.Ohair@xxxxxxx>
Cc: findbugs-discuss@xxxxxxxxxxxxxxxxxx
Subject: Re: [FB-Discuss] Bug about multiple calls to same method.
I agree with your concern; that is bad advice.
Can you tell me the precise warning being generated by findbugs.
I need to identify which bug pattern that is being reported as,
or which detector is generating it.
Bill
On Sep 15, 2006, at 3:16 PM, Kelly O'Hair wrote:
The most recent findbugs has found some new 'bugs' but after fixing
one I created a nasty bug.
In the past I've trusted the findbugs analysis, maybe too much, but
I recently had some code that looked like:
int a = o.get();
int b = o.get();
int c = o.get();
(the names have changed to protect the innocent)
and findbugs said I've made three calls to the same method, could
just call
it once. Ok (stupid me) makes sense to me, I change it to:
int t = o.get();
int a = t;
int b = t;
int c = t;
WRONG! The get() method is walking through a byte buffer!
Seems like findbugs might want to limit this "bug" to leaf methods?
Or ones it knows doesn't have side effects?
-kto
_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
|
|