[Mono-bugs] [Bug 669674] New: AvoidUnnecessarySpecializationRule generates false positive

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 4 15:13:17 EST 2011



           Summary: AvoidUnnecessarySpecializationRule generates false
    Classification: Mono
           Product: Mono: Tools
           Version: 2.10.x
          Platform: 64bit
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: ethan_j_brown at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.11 Safari/534.16

Perhaps this is by design, but in my example, a method accepts a parameter of
type Test.  .GetFields() is called against the Type.  The
AvoidUnnecessarySpecializationRule rule wants the parameter to be changed to
IReflect.  While IReflect does have a number of .GetFields(*) overloads, it
does contain one with no parameters.

For sure, Type.GetFields() could be changed to IReflect.GetFields(Public /
Instance/Static) which is the default behavior of Type.GetFields().  However,
thats an implementation detail of Type.GetFields() that perhaps we want to rely

Demonstration here

Reproducible: Always

Steps to Reproduce:
1.Run tests from Github

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