-
Notifications
You must be signed in to change notification settings - Fork 2
Description
1). Obsolete AND with true with no reason or value
https://github.com/jivesoftware/JiveAuthenticatingHTTPProtocol/blob/master/Source/JiveAuthenticatingHTTPProtocol/JAHPAuthenticatingHTTPProtocol.m#L256
shouldAccept = YES && [scheme isEqual:@"http"];This is equivalent to shouldAccept = [scheme isEqual:@"http"]; according to the boolean algebra theory.
2). _cmd can be used for most delegate method forwarding.
https://github.com/jivesoftware/JiveAuthenticatingHTTPProtocol/blob/master/Source/JiveAuthenticatingHTTPProtocol/JAHPAuthenticatingHTTPProtocol.m#L527
3). "Pure C" assert() function used in objective-c methods instead of NSAssert() or NSParameterAssert() that provide better error messages and crash dumps.
4). Retain cycles and possibly memory leaks. No single "weakify" statement across the entire project.
For example :
[self performOnThread:nil
modes:nil
block:^void()
{
// `self` captured by the block
// `self` cannot be destroyed while the block "lives" (in the queue, for instance)
// both might live forever if not dismissed properly
//
[self mainThreadDidReceiveAuthenticationChallenge:challenge
completionHandler:completionHandler];
}];If such lifetime behaviour is desired, some memory management related comments are needed.