Author: mhabersack
Date: 2007-11-02 19:51:30 -0500 (Fri, 02 Nov 2007)
New Revision: 88762
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
Log:
2007-11-03 Marek Habersack <[EMAIL PROTECTED]>
* MinimizableAttributeTypeConverter.cs: don't throw on null value,
call the base class method in that case.
2007-11-03 Marek Habersack <[EMAIL PROTECTED]>
* TemplateControlCompiler.cs: do not call converters specified in
the member custom attributes if 'str' is null in
GetExpressionFromString.
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-11-03
00:28:48 UTC (rev 88761)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-11-03
00:51:30 UTC (rev 88762)
@@ -1,3 +1,9 @@
+2007-11-03 Marek Habersack <[EMAIL PROTECTED]>
+
+ * TemplateControlCompiler.cs: do not call converters specified in
+ the member custom attributes if 'str' is null in
+ GetExpressionFromString.
+
2007-10-23 Marek Habersack <[EMAIL PROTECTED]>
* AppResourcesAssemblyBuilder.cs: do not output preservation files
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-11-03 00:28:48 UTC (rev 88761)
+++
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-11-03 00:51:30 UTC (rev 88762)
@@ -1645,7 +1645,7 @@
object convertedFromAttr = null;
bool preConverted = false;
- if (cvt != null) {
+ if (cvt != null && str != null) {
convertedFromAttr =
cvt.ConvertFromInvariantString (str);
if (convertedFromAttr != null) {
type = convertedFromAttr.GetType ();
Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2007-11-03 00:28:48 UTC
(rev 88761)
+++ trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2007-11-03 00:51:30 UTC
(rev 88762)
@@ -1,5 +1,8 @@
2007-11-03 Marek Habersack <[EMAIL PROTECTED]>
+ * MinimizableAttributeTypeConverter.cs: don't throw on null value,
+ call the base class method in that case.
+
* SimpleWebHandlerParser.cs: don't NRE on a null assembly passed
to AddAssembly.
AddAssemblyByName must check the return value of
Modified:
trunk/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
2007-11-03 00:28:48 UTC (rev 88761)
+++
trunk/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
2007-11-03 00:51:30 UTC (rev 88762)
@@ -60,17 +60,15 @@
public override object ConvertFrom (ITypeDescriptorContext
context, CultureInfo culture, object value)
{
// culture?
- if (value == null) {
- throw new NotSupportedException
("MinimizableAttributeTypeConverter cannot convert from (null)");
- }
-
- Type t = value.GetType ();
- if (t == typeof (string))
- return ((string)value) != String.Empty;
+ if (value != null) {
+ Type t = value.GetType ();
+ if (t == typeof (string))
+ return ((string)value) != String.Empty;
- if (t == typeof (bool))
- return value;
-
+ if (t == typeof (bool))
+ return value;
+ }
+
return base.ConvertFrom (context, culture, value);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches