Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#352 closed defect (fixed)

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

Reported by: jessicacao Owned by: 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.
  1. 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 (2)

comment:1 by tomfukushima, 16 years ago

Resolution: fixed
Status: newclosed

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.

comment:2 by tomfukushima, 16 years ago

Version: 2.0.0
Note: See TracTickets for help on using tickets.