Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorBen Maurer <benm@mono-cvs.ximian.com>2004-09-08 01:54:51 +0400
committerBen Maurer <benm@mono-cvs.ximian.com>2004-09-08 01:54:51 +0400
commit19c773bf3e1c519819372230376345326f2d5768 (patch)
treebef279593ccc6d3e42d34662f32b548479612c64 /mcs
parent71d75502b25da18717ef43bab6fd71b7b72ee469 (diff)
2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
* Activator.cs (CreateInstance): If an argument is null, do not call GetType () on it. #63852 svn path=/branches/mono-1-0/mcs/; revision=33550
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/System/Activator.cs14
-rw-r--r--mcs/class/corlib/System/ChangeLog5
2 files changed, 13 insertions, 6 deletions
diff --git a/mcs/class/corlib/System/Activator.cs b/mcs/class/corlib/System/Activator.cs
index 4727251d9e6..6cb4c24b262 100644
--- a/mcs/class/corlib/System/Activator.cs
+++ b/mcs/class/corlib/System/Activator.cs
@@ -168,9 +168,10 @@ namespace System
length = args.Length;
Type [] atypes = new Type [length];
- for (int i = 0; i < length; ++i) {
- atypes [i] = args [i].GetType ();
- }
+ for (int i = 0; i < length; ++i)
+ if (args [i] != null)
+ atypes [i] = args [i].GetType ();
+
ConstructorInfo ctor = type.GetConstructor (atypes);
if (ctor == null) {
if (type.IsValueType && atypes.Length == 0)
@@ -213,9 +214,10 @@ namespace System
length = args.Length;
Type[] atypes = new Type [length];
- for (int i = 0; i < length; ++i) {
- atypes [i] = args [i].GetType ();
- }
+ for (int i = 0; i < length; ++i)
+ if (args [i] != null)
+ atypes [i] = args [i].GetType ();
+
ConstructorInfo ctor = type.GetConstructor (bindingAttr, binder, atypes, null);
if (ctor == null) {
// Not sure about this
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index d07ee07070c..f9e07458385 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * Activator.cs (CreateInstance): If an argument is null,
+ do not call GetType () on it. #63852
+
2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Environment.cs: (ExpandEnvironmentVariables) don't nullify the case