@@ -18,40 +18,40 @@ #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" @implementation OFHashAlreadyCalculatedException -@synthesize hashObject = _hashObject; +@synthesize object = _object; -+ (instancetype)exceptionWithHash: (id )hash ++ (instancetype)exceptionWithObject: (id )object { - return [[[self alloc] initWithHash: hash] autorelease]; + return [[[self alloc] initWithObject: object] autorelease]; } - init { OF_INVALID_INIT_METHOD } -- initWithHash: (id )hashObject +- initWithObject: (id )object { self = [super init]; - _hashObject = [hashObject retain]; + _object = [object retain]; return self; } - (void)dealloc { - [_hashObject release]; + [_object release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"The hash of type %@ has already been calculated and thus no new " - @"data can be added!", [_hashObject class]]; + @"data can be added!", [_object class]]; } @end