Bug 3835 - NSCachedUrlResponse constructor should accept null for userInfo param
Summary: NSCachedUrlResponse constructor should accept null for userInfo param
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2012-03-09 14:00 UTC by Scott Blomquist (sblom)
Modified: 2012-03-10 13:56 UTC (History)
3 users (show)

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

The unit test (2.70 KB, application/octet-stream)
2012-03-09 17:48 UTC, Duncan Mak

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 Developer Community or GitHub 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:

Description Scott Blomquist (sblom) 2012-03-09 14:00:33 UTC

Call: new NSCachedUrlResponse(response, data, null, NSUrlCacheStoragePolicy.NotAllowed);


[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null.
Parameter name: userInfo
  at MonoTouch.Foundation.NSCachedUrlResponse..ctor (MonoTouch.Foundation.NSUrlResponse response, MonoTouch.Foundation.NSData data, MonoTouch.Foundation.NSDictionary userInfo, NSUrlCacheStoragePolicy storagePolicy) [0x00033] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSCachedUrlResponse.g.cs:87 


null should be a permitted value for the userInfo parameter according to the Apple developer docs:

Comment 1 Sebastien Pouliot 2012-03-09 14:43:28 UTC
You're right. A null value is allowed. I'll fix this asap.
Thanks for the report.
Comment 2 Duncan Mak 2012-03-09 15:30:40 UTC
This has been fixed in e7bad4fb200677ef8e6eaa2c020480551bc9b50f in the master branch.

QA: Unit tests forthcoming.
Comment 3 Duncan Mak 2012-03-09 17:48:43 UTC
Created attachment 1491 [details]
The unit test
Comment 4 Sebastien Pouliot 2012-03-10 13:56:33 UTC
test committed (with a few changes) in master
fix backported to 5.2-series