Well, it is cool. Will it be part of 2.2 release not later? Regards,
Lex On Dec 21, 5:43 pm, Letiemble <[email protected]> wrote: > Hello, > > This issue has been fixed in SVN HEAD. > Seehttp://groups.google.com/group/gendarme/browse_thread/thread/d6feab1c... > for more details. > > 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 -~----------~----~----~----~------~----~------~--~---

