[Mono-bugs] [Bug 839075] New: EventTypeFilter.ShouldTrace(...) always returns true
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Sep 7 19:17:53 UTC 2013
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 at lists.ximian.com
ReportedBy: yrs.raider at gmail.com
QAContact: mono-bugs at 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.
More information about the mono-bugs
mailing list