https://bugzilla.novell.com/show_bug.cgi?id=667692
https://bugzilla.novell.com/show_bug.cgi?id=667692#c0 Summary: AvoidAlwaysNullFieldRule false positive Classification: Mono Product: Mono: Tools Version: 2.10.x Platform: Other OS/Version: Windows XP Status: NEW Severity: Normal Priority: P5 - None Component: Gendarme AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E) This snippet fire false positive : class Program { private string[] bar = null; public void SetBar(IEnumerable<string> boo) { bar = boo == null ? null : boo.ToArray(); } } Reproducible: Always Steps to Reproduce: 1. Compile the snippet 2. Run gendarme 3. Actual Results: AvoidAlwaysNullFieldRule fire a defect Expected Results: No defect :) Note that the following code don't fire the defect: public void SetBar(IEnumerable<string> boo) { bar = boo != null ? boo.ToArray() : null; } -- 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 - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
