From eff94d1c965a83e9d8f0b4384f444b42aa780b32 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 14 Feb 2013 00:14:27 +0100 Subject: [PATCH] Don't cache the description of exceptions. This was pretty pointless, as it's usually only used once. --- src/SSLInvalidCertificateException.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/SSLInvalidCertificateException.m b/src/SSLInvalidCertificateException.m index d51f58e..9fdaa99 100644 --- a/src/SSLInvalidCertificateException.m +++ b/src/SSLInvalidCertificateException.m @@ -67,13 +67,9 @@ - (OFString*)description { - if (_description != nil) - return _description; - - _description = [[OFString alloc] initWithFormat: - @"Invalid certificate! Reason: %@", _reason]; - - return _description; + return [OFString stringWithFormat: + @"Invalid certificate in class %@! Reason: %@", [self inClass], + _reason]; } - (OFString*)reason