http://bugzilla.novell.com/show_bug.cgi?id=496285


           Summary: Error when loading XDocument
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Description of Problem:


Steps to reproduce the problem:
1. Create an XmlTextReader (specifically without XmlReaderSettings)
var reader = new XmlTextReader(new MemoryStream(responseInBytes))

2. Load that reader into an XDocument
var doc = XDocument.Load(reader)


Actual Results:
Null reference exception


Expected Results:
Document should be loaded

How often does this happen? 
Every time

Additional Information:
This code works on ms.net.
The problem is in the XDocument.Load method (line 125).
It should check to see if the Settings property on the reader is null. If it is
it should use default values, something like:

125: XmlReaderSettings s = reader.Settings == null ? new XmlReaderSettings() :
reader.Settings.Clone();

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to