Skip to content

[SR-2148] Manipulating resource values on URL shouldn't be mutating #4125

Open
@guoye-zhang

Description

@guoye-zhang
Previous ID SR-2148
Radar None
Original Reporter @guoye-zhang
Type Improvement
Additional Detail from JIRA
Votes 2
Component/s Foundation
Labels Improvement, SDKOverlay
Assignee None
Priority Medium

md5: 9ab28b049f9a6d462acc859bdfa214af

Issue Description:

The following 4 functions of URL are marked as mutating, yet they do not actually mutate the URL.

public mutating func setResourceValues(_ values: URLResourceValues) throws
public mutating func setTemporaryResourceValue(_ value : AnyObject, forKey key: URLResourceKey)
public mutating func removeAllCachedResourceValues()
public mutating func removeCachedResourceValue(forKey key: URLResourceKey)

Resource values are not part of the URL, rather they are a part of the file which URL points to. Therefore manipulating resource values shouldn't be mutating.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions