зеркало из https://github.com/mono/mail-archives.git
140 строки
5.6 KiB
HTML
140 строки
5.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 77589][Nor] New - SerializationCodeGenerator
|
|
generates invalid code for jagged byte array
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077589%5D%5BNor%5D%20New%20-%20SerializationCodeGenerator%0A%09generates%20invalid%20code%20for%20jagged%20byte%20array&In-Reply-To=bug-77589%40chernobyl.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="039367.html">
|
|
<LINK REL="Next" HREF="039369.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 77589][Nor] New - SerializationCodeGenerator
|
|
generates invalid code for jagged byte array</H1>
|
|
<B>bugzilla-daemon at bugzilla.ximian.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077589%5D%5BNor%5D%20New%20-%20SerializationCodeGenerator%0A%09generates%20invalid%20code%20for%20jagged%20byte%20array&In-Reply-To=bug-77589%40chernobyl.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 77589][Nor] New - SerializationCodeGenerator
|
|
generates invalid code for jagged byte array">bugzilla-daemon at bugzilla.ximian.com
|
|
</A><BR>
|
|
<I>Sat Feb 18 06:35:19 EST 2006</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="039367.html">[Mono-bugs] [Bug 77588][Nor] Changed - [PATCH]
|
|
SerializationCodeGenerator generates invalid code for Array
|
|
with no default public ctor
|
|
</A></li>
|
|
<LI>Next message: <A HREF="039369.html">[Mono-bugs] [Bug 77486][Nor] Changed - Uri.ToString() doesn't
|
|
escape '&' in query
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#39368">[ date ]</a>
|
|
<a href="thread.html#39368">[ thread ]</a>
|
|
<a href="subject.html#39368">[ subject ]</a>
|
|
<a href="author.html#39368">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gert.driesen at pandora.be.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=77589">http://bugzilla.ximian.com/show_bug.cgi?id=77589</A>
|
|
|
|
--- shadow/77589 2006-02-18 06:35:19.000000000 -0500
|
|
+++ shadow/77589.tmp.16431 2006-02-18 06:35:19.000000000 -0500
|
|
@@ -0,0 +1,64 @@
|
|
+Bug#: 77589
|
|
+Product: Mono: Class Libraries
|
|
+Version: 1.1
|
|
+OS:
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Normal
|
|
+Component: Sys.XML
|
|
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">lluis at ximian.com</A>
|
|
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gert.driesen at pandora.be</A>
|
|
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: SerializationCodeGenerator generates invalid code for jagged byte array
|
|
+
|
|
+SerializationCodeGenerator generates invalid code for a jagged byte array
|
|
+which has been assigned an XmlAttribute with DataType "base64Binary".
|
|
+
|
|
+To reproduce, compile the following code snippet:
|
|
+
|
|
+using System;
|
|
+using System.Collections;
|
|
+using System.Xml.Serialization;
|
|
+
|
|
+public class EntryPoint
|
|
+{
|
|
+ static void Main ()
|
|
+ {
|
|
+ XmlReflectionImporter importer = new XmlReflectionImporter ();
|
|
+ XmlTypeMapping map = importer.ImportTypeMapping (typeof (ArrayType));
|
|
+ XmlSerializer xs = new XmlSerializer (map);
|
|
+ xs.Serialize (Console.Out, new ArrayType ());
|
|
+ }
|
|
+}
|
|
+
|
|
+public class ArrayType
|
|
+{
|
|
+ [XmlAttribute (DataType = "base64Binary")]
|
|
+ public byte[][] bin1 = new byte[][] { new byte[] { 1, 2 }, new byte[] {
|
|
+1, 2 } };
|
|
+}
|
|
+
|
|
+and run it:
|
|
+
|
|
+$ export MONO_XMLSERIALIZER_THS=0
|
|
+$ mono test.exe
|
|
+
|
|
+Actual result:
|
|
+
|
|
+Error while compiling generated serializer
|
|
+/tmp/xxxxx.cs : warning CS0642: Possible mistaken empty statement
|
|
+/tmp/xxxxx.cs : error CS1526: A new expression requires () or [] after
|
|
+type
|
|
+<?xml version="1.0" encoding="iso-8859-1"?>
|
|
+<ArrayType xmlns:xsd="<A HREF="http://www.w3.org/2001/XMLSchema"">http://www.w3.org/2001/XMLSchema"</A>
|
|
+xmlns:xsi="<A HREF="http://www.w3.org/2001/XMLSchema-instance"">http://www.w3.org/2001/XMLSchema-instance"</A> bin1="AQI= AQI=" />
|
|
+
|
|
+Expected result:
|
|
+
|
|
+<ArrayType xmlns:xsd="<A HREF="http://www.w3.org/2001/XMLSchema"">http://www.w3.org/2001/XMLSchema"</A>
|
|
+xmlns:xsi="<A HREF="http://www.w3.org/2001/XMLSchema-instance"">http://www.w3.org/2001/XMLSchema-instance"</A> bin1="AQI= AQI=" />
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="039367.html">[Mono-bugs] [Bug 77588][Nor] Changed - [PATCH]
|
|
SerializationCodeGenerator generates invalid code for Array
|
|
with no default public ctor
|
|
</A></li>
|
|
<LI>Next message: <A HREF="039369.html">[Mono-bugs] [Bug 77486][Nor] Changed - Uri.ToString() doesn't
|
|
escape '&' in query
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#39368">[ date ]</a>
|
|
<a href="thread.html#39368">[ thread ]</a>
|
|
<a href="subject.html#39368">[ subject ]</a>
|
|
<a href="author.html#39368">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|