[Mono-bugs] [Bug 656790] New: NullReferenceException in ReviewLinqMethodRule

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 1 08:54:48 EST 2010



           Summary: NullReferenceException in ReviewLinqMethodRule
    Classification: Mono
           Product: Mono: Tools
           Version: 2.8.x
          Platform: Other
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: david at dasz.at
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: ---

Created an attachment (id=402898)
 --> (http://bugzilla.novell.com/attachment.cgi?id=402898)
an assembly demonstrating the error

When running gendarme 2.8 on a local assembly I get the following exception:

Rule:    Gendarme.Rules.Performance.ReviewLinqMethodRule
  Target:    System.Collections.Generic.IEnumerable`1<Kistl.API.IStreamable>
  Stack trace: System.NullReferenceException: Object reference not set to an
instance of an object.
     at Gendarme.Framework.Runner.OnMethod(RunnerEventArgs e)
     at Gendarme.Framework.Runner.Run()
     at Gendarme.ConsoleRunner.Run()
     at Gendarme.ConsoleRunner.Execute(String[] args)

The following example, compiled with VS2010 against .net4.0 or 3.5 triggers the

    public class Class1
        public virtual int CanExecute<T>(object data)
            return ((IEnumerable<T>)data).Count()   ;

I'll upload the test assembly.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list