Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -108,11 +108,11 @@ Stringprep_rc rc; if ((rc = stringprep_profile([username_ UTF8String], &node, "SASLprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self profile: @"SASLprep" string: username_]; @try { @@ -136,11 +136,11 @@ Stringprep_rc rc; if ((rc = stringprep_profile([resource_ UTF8String], &res, "Resourceprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self profile: @"Resourceprep" string: resource_]; @try { @@ -177,11 +177,11 @@ Stringprep_rc rc; if ((rc = stringprep_profile([domain_ UTF8String], &srv, "Nameprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self profile: @"Nameprep" string: domain_]; @try { @@ -207,11 +207,11 @@ Stringprep_rc rc; if ((rc = stringprep_profile([password_ UTF8String], &pass, "SASLprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self profile: @"SASLprep" string: password_]; @try { @@ -693,14 +693,15 @@ reason = [[element elementForName: @"text" namespace: XMPP_NS_XMPP_STREAM] stringValue]; - @throw [XMPPStreamErrorException exceptionWithClass: isa - connection: self - condition: condition - reason: reason]; + @throw [XMPPStreamErrorException + exceptionWithClass: [self class] + connection: self + condition: condition + reason: reason]; return; } assert(0); } @@ -733,11 +734,11 @@ return; } if ([[element name] isEqual: @"failure"]) /* TODO: Find/create an exception to throw here */ - @throw [OFException exceptionWithClass: isa]; + @throw [OFException exceptionWithClass: [self class]]; assert(0); } - (void)XMPP_handleSASL: (OFXMLElement*)element @@ -779,11 +780,11 @@ if ([[element name] isEqual: @"failure"]) { of_log(@"Auth failed!"); // FIXME: Do more parsing/handling @throw [XMPPAuthFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self reason: [element XMLString]]; } assert(0); @@ -846,11 +847,11 @@ return; } if (encryptionRequired && !encrypted) /* TODO: Find/create an exception to throw here */ - @throw [OFException exceptionWithClass: isa]; + @throw [OFException exceptionWithClass: [self class]]; if ([element elementForName: @"ver" namespace: XMPP_NS_ROSTERVER] != nil) supportsRosterVersioning = YES; @@ -1036,11 +1037,11 @@ Idna_rc rc; if ((rc = idna_to_ascii_8z([domain_ UTF8String], &cDomain, IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS) @throw [XMPPIDNATranslationFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: self operation: @"ToASCII" string: domain_]; @try { @@ -1068,11 +1069,12 @@ } - (void)setDataStorage: (id )dataStorage_ { if (streamOpen) - @throw [OFInvalidArgumentException exceptionWithClass: isa]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class]]; dataStorage = dataStorage_; } - (id )dataStorage Index: src/XMPPExceptions.m ================================================================== --- src/XMPPExceptions.m +++ src/XMPPExceptions.m @@ -35,11 +35,11 @@ connection: conn] autorelease]; } - initWithClass: (Class)class_ { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -95,11 +95,11 @@ } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -165,11 +165,11 @@ } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -236,11 +236,11 @@ } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -304,11 +304,11 @@ } - initWithClass: (Class)class_ connection: (XMPPConnection*)conn { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } Index: src/XMPPIQ.m ================================================================== --- src/XMPPIQ.m +++ src/XMPPIQ.m @@ -45,11 +45,11 @@ @try { if (![type_ isEqual: @"get"] && ![type_ isEqual: @"set"] && ![type_ isEqual: @"result"] && ![type_ isEqual: @"error"]) @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; } @catch (id e) { [self release]; @throw e; } Index: src/XMPPJID.m ================================================================== --- src/XMPPJID.m +++ src/XMPPJID.m @@ -114,11 +114,11 @@ if (((rc = stringprep_profile([node_ UTF8String], &nodepart, "Nodeprep", 0)) != STRINGPREP_OK) || (nodepart[0] == '\0') || (strlen(nodepart) > 1023)) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: nil profile: @"Nodeprep" string: node_]; @try { @@ -143,11 +143,11 @@ if (((rc = stringprep_profile([domain_ UTF8String], &srv, "Nameprep", 0)) != STRINGPREP_OK) || (srv[0] == '\0') || (strlen(srv) > 1023)) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: nil profile: @"Nameprep" string: domain_]; @try { @@ -178,11 +178,11 @@ if (((rc = stringprep_profile([resource_ UTF8String], &res, "Resourceprep", 0)) != STRINGPREP_OK) || (res[0] == '\0') || (strlen(res) > 1023)) @throw [XMPPStringPrepFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: nil profile: @"Resourceprep" string: resource_]; @try { Index: src/XMPPJSONFileStorage.m ================================================================== --- src/XMPPJSONFileStorage.m +++ src/XMPPJSONFileStorage.m @@ -35,11 +35,11 @@ #import "XMPPJSONFileStorage.h" @implementation XMPPJSONFileStorage - init { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } Index: src/XMPPRoster.m ================================================================== --- src/XMPPRoster.m +++ src/XMPPRoster.m @@ -211,11 +211,12 @@ } - (void)setDataStorage: (id )dataStorage_ { if (rosterRequested) - @throw [OFInvalidArgumentException exceptionWithClass: isa]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class]]; dataStorage = dataStorage_; } - (id )dataStorage Index: src/XMPPSCRAMAuth.m ================================================================== --- src/XMPPSCRAMAuth.m +++ src/XMPPSCRAMAuth.m @@ -229,11 +229,11 @@ of_range(2, [comp length] - 2)]; if ([comp hasPrefix: @"r="]) { if (![entry hasPrefix: cNonce]) @throw [XMPPAuthFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: nil reason: @"Received wrong " @"nonce"]; sNonce = entry; @@ -247,11 +247,12 @@ got |= GOT_ITERCOUNT; } } if (got != (GOT_SNONCE | GOT_SALT | GOT_ITERCOUNT)) - @throw [OFInvalidServerReplyException exceptionWithClass: isa]; + @throw [OFInvalidServerReplyException + exceptionWithClass: [self class]]; // Add c= tmpArray = [OFDataArray dataArray]; [tmpArray addItemsFromCArray: [GS2Header UTF8String] count: [GS2Header UTF8StringLength]]; @@ -390,17 +391,17 @@ value = [mess substringWithRange: of_range(2, [mess length] - 2)]; if ([mess hasPrefix: @"v="]) { if (![value isEqual: [serverSignature stringByBase64Encoding]]) @throw [XMPPAuthFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] connection: nil reason: @"Received wrong " @"ServerSignature"]; authenticated = YES; } else - @throw [XMPPAuthFailedException exceptionWithClass: isa + @throw [XMPPAuthFailedException exceptionWithClass: [self class] connection: nil reason: value]; return nil; } Index: src/XMPPSRVLookup.m ================================================================== --- src/XMPPSRVLookup.m +++ src/XMPPSRVLookup.m @@ -53,11 +53,11 @@ handle: handle] autorelease]; } - init { - Class c = isa; + Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } @@ -96,11 +96,11 @@ port = ntohs(rdata[2]); if (dn_expand(ns_msg_base(handle), ns_msg_end(handle), (uint8_t*)&rdata[3], buffer, NS_MAXDNAME) < 1) @throw [OFInitializationFailedException - exceptionWithClass: isa]; + exceptionWithClass: [self class]]; target = [[OFString alloc] initWithCString: buffer encoding: OF_STRING_ENCODING_NATIVE]; } @catch (id e) { @@ -118,14 +118,13 @@ [super dealloc]; } - (OFString*)description { - return [OFString stringWithFormat: @"<%@ priority: %" PRIu16 - @", weight: %" PRIu16 - @", target: %@:%" PRIu16 @">", - isa, priority, weight, target, port]; + return [OFString stringWithFormat: + @"<%@ priority: %" PRIu16 @", weight: %" PRIu16 @", target: %@:%" + PRIu16 @">", [self class], priority, weight, target, port]; } - (uint16_t)priority { return priority; @@ -206,11 +205,11 @@ ns_rr resourceRecord; ns_msg handle; if (res_ninit(&resState)) @throw [OFAddressTranslationFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] socket: nil host: domain]; answer = [self allocMemoryWithSize: of_pagesize]; answerLen = res_nsearch(&resState, [request cStringWithEncoding: @@ -221,18 +220,18 @@ (h_errno == NO_DATA))) return; if (answerLen < 1 || answerLen > of_pagesize) { @throw [OFAddressTranslationFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] socket: nil host: domain]; } if (ns_initparse(answer, answerLen, &handle)) @throw [OFAddressTranslationFailedException - exceptionWithClass: isa + exceptionWithClass: [self class] socket: nil host: domain]; resourceRecordCount = ns_msg_count(handle, ns_s_an); for (i = 0; i < resourceRecordCount; i++) { Index: src/XMPPStanza.m ================================================================== --- src/XMPPStanza.m +++ src/XMPPStanza.m @@ -95,11 +95,11 @@ @try { if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] && ![name_ isEqual: @"presence"]) @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; [self setDefaultNamespace: XMPP_NS_CLIENT]; [self setPrefix: @"stream" forNamespace: XMPP_NS_STREAM]; Index: src/XMPPXMLElementBuilder.m ================================================================== --- src/XMPPXMLElementBuilder.m +++ src/XMPPXMLElementBuilder.m @@ -30,14 +30,14 @@ @implementation XMPPXMLElementBuilder - (void)parser: (OFXMLParser*)parser foundProcessingInstructions: (OFString*)pi { - @throw [OFMalformedXMLException exceptionWithClass: isa]; + @throw [OFMalformedXMLException exceptionWithClass: [self class]]; } - (void)parser: (OFXMLParser*)parser foundComment: (OFString*)comment { - @throw [OFMalformedXMLException exceptionWithClass: isa]; + @throw [OFMalformedXMLException exceptionWithClass: [self class]]; } @end