75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
}
- (instancetype)initWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding
{
self = [super init];
@try {
_categories = [[OFMutableArray alloc] init];
[self of_parseIRI: IRI encoding: encoding];
} @catch (id e) {
[self release];
@throw e;
}
|
|
>
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
}
- (instancetype)initWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding
{
self = [super init];
@try {
_categories = [[OFMutableArray alloc] initWithObject:
[[[OFINICategory alloc] of_initWithName: @""] autorelease]];
[self of_parseIRI: IRI encoding: encoding];
} @catch (id e) {
[self release];
@throw e;
}
|
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
OFString *categoryName;
if (![line hasSuffix: @"]"])
@throw [OFInvalidFormatException exception];
categoryName = [line substringWithRange:
OFMakeRange(1, line.length - 2)];
category = [[[OFINICategory alloc]
of_initWithName: categoryName] autorelease];
[_categories addObject: category];
} else {
if (category == nil)
@throw [OFInvalidFormatException exception];
[category of_parseLine: line];
}
}
objc_autoreleasePoolPop(pool);
}
|
>
>
>
|
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
OFString *categoryName;
if (![line hasSuffix: @"]"])
@throw [OFInvalidFormatException exception];
categoryName = [line substringWithRange:
OFMakeRange(1, line.length - 2)];
if (categoryName.length == 0)
@throw [OFInvalidFormatException exception];
category = [[[OFINICategory alloc]
of_initWithName: categoryName] autorelease];
[_categories addObject: category];
} else {
if (category == nil)
category = [self categoryForName: @""];
[category of_parseLine: line];
}
}
objc_autoreleasePoolPop(pool);
}
|