On Sun, 2008-12-21 at 01:43 -0800, Letiemble wrote:
> Hello,
> 
> This issue has been fixed in SVN HEAD. See
> http://groups.google.com/group/gendarme/browse_thread/thread/d6feab1c9204f948
> for more details.

Not really, that was a (very) similar issue in another rule. I should b
able to reuse the same fix for this one (I simply forgot it was used
elsewhere too).

Sebastien

> Regards, Laurent Etiemble.
> 
> On Dec 21, 9:15 am, Lex Li - MSFT <[email protected]> wrote:
> > I got such a report on #SNMP source code.
> >
> > 21. ProtectCallToEventDelegatesRule
> >
> > Problem: The use of the event does not seems protected properly
> > against NullReferenceException and/or race conditions.
> > Details [Severity: High, Confidence: Normal]
> > * Target: System.Void
> > Lextm.SharpSnmpLib.Manager::TrapListener_InformRequestReceived
> > (System.Object,Lextm.SharpSnmpLib.InformRequestReceivedEventArgs)
> > * Variable 'handler' does not seems to be checked against null.
> >
> > Solution: Fix the event use to make sure it wont be null nor be
> > susceptible to a race condition.
> > More info available 
> > at:http://www.mono-project.com/Gendarme.Rules.Concurrency#ProtectCallToE...
> >
> > But it is a false alarm in my opinion because I did check against null
> > except I used if (null != handler). If I changed it back to if
> > (handler != null) then this warning would disappear. Hope Gendarme can
> > support (null != handler) some day as some books on C# use such a
> > style. We don't want to puzzle some beginners by this rule, do we?
> > 


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to