[Mono-bugs] [Bug 74861][Nor] New - [PATCH] Exeptions thrown by Activator.CreateInstance do not match those of MS.NET

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 7 May 2005 10:52:11 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=74861

--- shadow/74861	2005-05-07 10:52:11.000000000 -0400
+++ shadow/74861.tmp.16501	2005-05-07 10:52:11.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 74861
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] Exeptions thrown by Activator.CreateInstance do not match those of MS.NET
+
+When an abstract type is passed to Activator.CreateInstance, the 
+exceptions thrown by Mono do not match those thrown by MS.NET.
+
+The attached patch (which includes unit tests) fixes this.  I also 
+attached a small test app to showcase the wrong behaviour.
+
+Before applying this patch the test app output this when running on Mono 
+(both 1.0 and 2.0 profile):
+
+MEMBER
+MEMBER
+MEMBER
+MEMBER
+MEMBER
+
+After applying the patch the test app output this when running on Mono 
+1.0 (compile with mcs) and MS.NET 1.1:
+
+MISSING
+MISSING
+MEMBER
+MEMBER
+MEMBER
+
+And the following output when running on Mono 2.0 (compile with gmcs) and 
+MS.NET 2.0 Beta 2:
+
+MISSING
+MISSING
+MISSING
+MISSING
+MISSING