Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
guoye-zhang opened this issue Jul 22, 2016 · 1 comment
Open

Comments

@guoye-zhang
Copy link

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.

@Dante-Broggi
Copy link

What should happen to this report?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants