Bug 23755 - System.Xml.XPath.Extensions.XPathSelectElement() behaves differently between .NET and Mono with null value
Summary: System.Xml.XPath.Extensions.XPathSelectElement() behaves differently between ...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-11 04:48 UTC by mail4dk
Modified: 2015-03-17 16:29 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A reproducing example of the difference between Mono and .NET (520 bytes, text/plain)
2014-10-11 04:48 UTC, mail4dk
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description mail4dk 2014-10-11 04:48:11 UTC
Created attachment 8383 [details]
A reproducing example of the difference between Mono and .NET

In .NET 4.5 the supplied code produces a System.ArgumentNullException as the argument passed to the extension method XPathSelectElement is null.

In Mono 3.10 the call to XPathSelectElement returns null which then continues execution and as a result code that runs fine on Mono throws on Windows/.NET 4.5.
Comment 1 Atsushi Eno 2015-03-17 16:29:11 UTC
Now both our System.Xml (for relevant part) and System.Xml.Linq (entirely) are based on referencesource and it throws ArgumentNullException as you expect.