bjhomer/HSCountingInputStream — Issue #1: Delegate for NSCountingStream looks suspicious
Author: sorced-jim
Created: 2012-03-01 21:48:05+00:00
State: open

Line 34 of HSCountingInputStream.m has

[parentStream setDelegate:self];

However, setDelegate on line 60 has:
- (void)setDelegate:(id)aDelegate {
if (aDelegate == nil) {
delegate = self;
}
else {
delegate = aDelegate;
}
}

This seems to imply that setDelegate should call [parentStream setDelegate:{aDelegate,self}] and delegate should return [parentStream delegate].

If that's not the intention, then why check for nil in setDelegate?