Closed Bug 426317 Opened 17 years ago Closed 17 years ago

Drop nsIAbMDBDirectory::getDirUri

Categories

(MailNews Core :: Address Book, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch The fix (obsolete) — Splinter Review
nsIAbMDBDirectory::getDirUri is the same as getting the URI from the RDF resource. Its only used in one place which can easily be changed. I've also changed a function call in nsMsgCompose (as I wanted to remove the comment) to avoid a getter_Copies call. I want this to help start to clean up our current mess of get URI implementations.
Attachment #312877 - Flags: superreview?(neil)
Attachment #312877 - Flags: review?(neil)
Attached patch The fix v2Splinter Review
Improved version removing the rdf api calls.
Attachment #312877 - Attachment is obsolete: true
Attachment #312945 - Flags: superreview?(neil)
Attachment #312945 - Flags: review?(neil)
Attachment #312877 - Flags: superreview?(neil)
Attachment #312877 - Flags: review?(neil)
Comment on attachment 312945 [details] [diff] [review] The fix v2 I particularly like the nsMsgCompose change :-)
Attachment #312945 - Flags: superreview?(neil)
Attachment #312945 - Flags: superreview+
Attachment #312945 - Flags: review?(neil)
Attachment #312945 - Flags: review+
Patch checked in -> fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
While reviewing the address book search setup as part of preparing unit tests for bug 187768, I saw some code I did not understand which I traced to this patch. Previously, in nsMsgSearchTerm::InitializeAddressBook there was this code: if (strcmp(dirURI.get(), m_value.string)) mDirectory = nsnull; // clear out the directory....we are no longer pointing to the right one which has now been replaced by: if (uri.Equals(m_value.string)) // clear out the directory....we are no longer pointing to the right one mDirectory = nsnull; But the logic is backwards. strcmp returns 0 (false) when the string are equal. So the new code should be: if (!uri.Equals(m_value.string))
Depends on: 436104
(In reply to comment #4) > While reviewing the address book search setup as part of preparing unit tests > for bug 187768, I saw some code I did not understand which I traced to this > patch. As this was code that got released (TB 3.0a1), I've raised a separate bug to handle the fixing of this (bug 436104).
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: