Bug 28184

Summary: ParameterInfo.GetCustomAttributes returns null in some cases
Product: [Mono] Class Libraries Reporter: Dylan Borg <borgdylan>
Component: mscorlibAssignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: borgdylan, masafa, mono-bugs+mono
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: repro with result in comments

Description Dylan Borg 2015-03-19 05:34:51 UTC
While using ASP.NET 5 on the latest code from master, I am getting a null output when getting custom attributes from a ParameterInfo instance. The spec says that an empty collection/array should be output when no attributes are found. In my case there are attributes yet null is mysteriously returned. I have tries to trawl the mono code base + reference-source but still could not find what is causing this. I believe that everything was OK before mono switched to the Microsoft version of the System.Attribute class.
Comment 1 Marek Safar 2015-03-19 08:34:10 UTC
I'd need some kind of repro to track it down.
Comment 2 Dylan Borg 2015-03-19 11:22:04 UTC
I did a repro using just one file's wort of code and confirmed the issue. See the attachment for the code and what came out of it.
Comment 3 Dylan Borg 2015-03-19 11:22:50 UTC
Created attachment 10413 [details]
repro with result in comments
Comment 4 Marek Safar 2015-03-19 17:43:17 UTC
Fixed in master