On 22/01/11 17:45, Sebastien Pouliot wrote:
On Sat, 2011-01-22 at 10:21 -0500, Sebastien Pouliot wrote:
On Sat, 2011-01-22 at 15:32 +0100, "Andrés G. Aragoneses" wrote:
Hello,
I think I've spotted some false positives in EnsureLocalDisposalRule. If
the IDisposable object detected by the rule is sent out of the scope of
the function (as a return variable, out parameter, or assigning it to
the property of some other non-local object), the rule shouldn't warn in
this case, or at least give a lower confidence, right?
Yes, that sounds rights.
Example:
class StreamFactory {
void GiveXStream (string file)
^ won't compile, I assume this should be returning a Stream and not
void ;-)
Actually once I changed this to return a Stream the rule will return
DoesNotApply (i.e. no defect). Your original test case was likely
different.
You sure it should be DoesNotApply instead of Success? I see
DoesNotApply would apply to methods that don't deal with IDisposable
objects at all.
I attached my unit tests in:
http://bugzilla.novell.com/666403
Thanks,
Andrés
--
--
You received this message because you are subscribed to the Google Groups
"Gendarme" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/gendarme?hl=en.