https://bugzilla.novell.com/show_bug.cgi?id=839075

https://bugzilla.novell.com/show_bug.cgi?id=839075#c0


           Summary: EventTypeFilter.ShouldTrace(...) always returns true
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: yrs.rai...@gmail.com
         QAContact: mono-bugs@lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36

System.Diagnostics.EventTypeFilter.ShouldTrace(...) always returns true, no
matter what the EventType filter is. 

You should not use a large switch block, because SourceLevels enum already
represents the results of such bitwise operations. I suggest you to use just
one check:

return (eventType & (TraceEventType)event_type) != 0;

Reproducible: Always

Steps to Reproduce:
new EventTypeFilter(SourceLevels.Critical).ShouldTrace(null, "",
TraceEventType.Verbose, 0, "", null, null, null) // Should bypass all events
except Critical, but returns true for Verbose.

-- 
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.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to