NSURL string initializer should return nil for empty strings

Originator:keithbsmiley
Number:rdar://23697416 Date Originated:30-Nov-2015 04:40 PM
Status:Closed (works as expected) Resolved:
Product:iOS SDK Product Version:iOS 9.1
Classification:Enhancement Reproducible:Always
 
Summary:

When creating a NSURL from an empty string, a non-nil NSURL is produced. This seems unintuitive as I would expect the optional initializer to return nil in this case.

Steps to Reproduce:

1. Create an NSURL with: `NSURL(string: "")`

Expected Results:

The initializer returns nil

Actual Results:

The initializer returns a non-nil NSURL

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!