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
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2004-07-22 13:25:59 +0400
committerLluis Sanchez <lluis@novell.com>2004-07-22 13:25:59 +0400
commit8dfa8e485de493263692cd93b58ab7468c9166c2 (patch)
treea688ff18f1f4cc94b164915611dd7486c436c6fd
parent3cce485c67ff32c680ee81e2ebbc6244cc2775b0 (diff)
* ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
must be the object class or a base class. This fixes bug #61249. svn path=/branches/mono-1-0/mcs/; revision=31369
-rwxr-xr-xmcs/class/corlib/System.Runtime.Remoting/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs2
2 files changed, 6 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
index f1c1e51db57..14aa52173f9 100755
--- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
@@ -1,5 +1,10 @@
2004-07-22 Lluis Sanchez Gual <lluis@novell.com>
+ * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
+ must be the object class or a base class. This fixes bug #61249.
+
+2004-07-22 Lluis Sanchez Gual <lluis@novell.com>
+
* RemotingServices.cs: Changed GetMethodBaseFromMethodMessage so its code
can be reused internally. Also fixed bug when gettting a method from an
interface.
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
index 90db146c267..30234367827 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
@@ -92,7 +92,7 @@ namespace System.Runtime.Remoting {
uri = RemotingServices.GetObjectUri(mbr);
typeInfo = new TypeInfo(type);
- if (!typeInfo.CanCastTo(mbr.GetType(), mbr))
+ if (!type.IsAssignableFrom (mbr.GetType()))
throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + ".");
UpdateChannelInfo();