Skip to content

Commit e9ead4f

Browse files
committed
Parity: URLProtocol
The only issue here was using NSUnimplemented() (“we still need to implement this”) instead of NSRequiresConcreteImplementation() (“this is an abstract method”). Fix it.
1 parent 6a1ca96 commit e9ead4f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Foundation/URLProtocol.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ open class URLProtocol : NSObject {
261261
@param request A request to make canonical.
262262
@result The canonical form of the given request.
263263
*/
264-
open class func canonicalRequest(for request: URLRequest) -> URLRequest { NSUnimplemented() }
264+
open class func canonicalRequest(for request: URLRequest) -> URLRequest {
265+
NSRequiresConcreteImplementation()
266+
}
265267

266268
/*!
267269
@method requestIsCacheEquivalent:toRequest:
@@ -272,7 +274,9 @@ open class URLProtocol : NSObject {
272274
implementation-specific checks.
273275
@result YES if the two requests are cache-equivalent, NO otherwise.
274276
*/
275-
open class func requestIsCacheEquivalent(_ a: URLRequest, to b: URLRequest) -> Bool { NSUnimplemented() }
277+
open class func requestIsCacheEquivalent(_ a: URLRequest, to b: URLRequest) -> Bool {
278+
NSRequiresConcreteImplementation()
279+
}
276280

277281
/*!
278282
@method startLoading

0 commit comments

Comments
 (0)