@@ -21,20 +21,20 @@ #import "OFInitializationFailedException.h" #import "OFOutOfRangeException.h" @implementation OFArray_NSArray -- initWithNSArray: (NSArray*)array_ +- initWithNSArray: (NSArray*)array { self = [super init]; @try { - array = [array_ retain]; - if (array == nil) @throw [OFInitializationFailedException - exceptionWithClass: isa]; + exceptionWithClass: [self class]]; + + _array = [array retain]; } @catch (id e) { [self release]; @throw e; } @@ -46,18 +46,18 @@ id object; if (index > NSUIntegerMax) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; - object = [array objectAtIndex: index]; + object = [_array objectAtIndex: index]; if ([object conformsToProtocol: @protocol(NSBridging)]) return [object OFObject]; return object; } - (size_t)count { - return [array count]; + return [_array count]; } @end