MapGuide Open Source:  Home |  Download |  Internals

Ticket #352 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

MgDuplicateObjectException is not thrown when inserting duplicated object using MgStringCollection:: Add() .

Reported by: jessicacao Assigned to: Tom Fukushima
Priority: medium Milestone: 2.0
Component: General Version: 2.0.0
Severity: major Keywords: MgStringCollection::Add
Cc: Trevor Wekel External ID: 985046

Description

MgDuplicateObjectException? is not thrown when inserting duplicated object using MgStringCollection:: Add() .

Step to recur:

1. Construct a MgStringCollection? and add a string object into it.

2. Add the same string object using Add();

Sample code:

MgStringCollection? strColl = new MgStringCollection?();

string str1 = "string1";

strColl.Add(str1);

// MgDuplicateObjectException? expected
strColl.Add(str1);

Expect result: MgDuplicateObjectException?

Actual result: No exception thrown

Change History

12/04/07 12:32:46 changed by tomfukushima

  • status changed from new to closed.
  • resolution set to fixed.

Actually the documentation is incorrect. MgStringCollection? allows duplicates and so the MgDuplicateObjectException? should not be thrown.

I have updated the comments in the header file: r2550.

12/04/07 12:33:08 changed by tomfukushima

  • version set to 2.0.0.