From: Veerapuram Varadhan Date: Wed, 4 May 2011 18:57:42 +0000 (+0530) Subject: [mono]bugfix:663287 - Validate the type of value against underlyingtype X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=f2870fbbf16ff1f836e647fb7b517d79c4ce0119;p=mono.git [mono]bugfix:663287 - Validate the type of value against underlyingtype instead of nullableType. --- diff --git a/mcs/class/System/System.ComponentModel/ChangeLog b/mcs/class/System/System.ComponentModel/ChangeLog index c4c7010de63..ff6b0f69c3e 100644 --- a/mcs/class/System/System.ComponentModel/ChangeLog +++ b/mcs/class/System/System.ComponentModel/ChangeLog @@ -1,3 +1,9 @@ +2011-05-05 Veerapuram Varadhan + + ** Fixes #663287 + * NullableConverter.cs (ConvertTo): Compare the type of value + against underlyingType instead of nullableType. + 2010-07-19 Marek Habersack * MultilineStringConverter.cs: implemented diff --git a/mcs/class/System/System.ComponentModel/NullableConverter.cs b/mcs/class/System/System.ComponentModel/NullableConverter.cs index 446f1cb590c..3bc6d3805a6 100644 --- a/mcs/class/System/System.ComponentModel/NullableConverter.cs +++ b/mcs/class/System/System.ComponentModel/NullableConverter.cs @@ -102,7 +102,7 @@ namespace System.ComponentModel // Explicit cast operator in Nullable when the user casts will take care // of extracting the inner value. - if (destinationType == underlyingType && value.GetType() == nullableType) + if (destinationType == underlyingType && value.GetType() == underlyingType) return value; if (underlyingTypeConverter != null && value != null)