[Mono-bugs] [Bug 636455] New: Binary Serialization formatters shouldn't throw on missing fields

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 1 17:16:33 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=636455

https://bugzilla.novell.com/show_bug.cgi?id=636455#c0


           Summary: Binary Serialization formatters shouldn't throw on
                    missing fields
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: knocte at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.11)
Gecko/20100714 SUSE/3.5.11-0.1.1 Firefox/3.5.11

This is actually the opposite of bug 321322, and you may be wondering why.

Well, first I think that bug may be only in the NET_1_1 profile or it may have
been fixed long time ago. However, with .NET 2.0 or higher the expected results
of that bug are not correct.

Let say you compile this class and binary-serialize one instance of it:

    [Serializable]
    public class Address
    {
        private string Street;
        private string City;

        private string SomeObsoleteField;
    }

If you take out the SomeObsoleteField and try to deserialize the object you
serialized earlier, it works on .NET here.

The key thing may be in this bit from the documentation:
http://msdn.microsoft.com/en-us/library/ms229752%28VS.80%29.aspx
Quoting:
"In the past, during deserialization, any extraneous or unexpected data caused
exceptions to be thrown. With VTS, in the same situation, any extraneous or
unexpected data is ignored instead of causing exceptions to be thrown."

Thus, "in the past" == .NET 1.x, "With VTS" == .NET 2.0.

Reproducible: Always

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list