1

Closed

ContactDirectory.cs throws exception

description

If, as can happen, a ContactDirectory search returns no matches, in Groove 2007, the ContactDirectory.cs code throws an null reference exception. An if clause testing for null saves the day.
 
 
fragment from ContactDirectory.cs:
 
            case GrooveWebServicesV12Helpers.Shared.GROOVE_CONTACT_DIRECTORY_SEARCH_RESULTS_EVENT_TYPE:
            {
                System.Collections.ArrayList ContactSummaryArrayList = new System.Collections.ArrayList();
 
                GrooveEventsWebService.GrooveContactSearchResultsEventData ContactSearchResultsEventData = (GrooveEventsWebService.GrooveContactSearchResultsEventData)i_Event.EventData;
 
                if (ContactSearchResultsEventData.ContactSummaryList != null)
                {
                    //  Populate array list of ContactSummaries
                    foreach (GrooveEventsWebService.ContactSummary ContactSummary in ContactSearchResultsEventData.ContactSummaryList)
                    {
                        GrooveWebServicesV12Helpers.ContactSummary NewContactSummary = new GrooveWebServicesV12Helpers.ContactSummary(ContactSummary);
                        ContactSummaryArrayList.Add(NewContactSummary);
                    }
                }
 
                //  Create array from array list
                if (ContactSummaryArrayList.Count > 0)
                    m_SearchedContactSummaries = (GrooveWebServicesV12Helpers.ContactSummary[])ContactSummaryArrayList.ToArray(typeof(GrooveWebServicesV12Helpers.ContactSummary));
 
                break;
            }
Closed Apr 21, 2007 at 12:55 AM by BobNovas
Fixed in Release 3

comments