Opened 11 years ago

Closed 11 years ago

#350 closed defect (fixed)

Expected MgIndexOutOfRangeException is not thrown by calling MgStringCollection:: SetItem() with an index out of range.

Reported by: jessicacao Owned by: trevorwekel
Priority: medium Milestone: 2.0
Component: General Version:
Severity: major Keywords: MgStringCollection::SetItem
Cc: Trevor Wekel External ID: 985059

Description

Expected MgIndexOutOfRangeException? is not thrown but MgInvalidArgumentException? by calling MgStringCollection:: SetItem?() with an index out of range.

Step to recur:

  1. Construct a MgStringCollection? and add a string object into it.
  1. Call SetItem?() with an index out of range.

Sample code:

MgStringCollection? strColl = new MgStringCollection?();

string str1 = "string1";

strColl.Add(str1);

MgIndexOutOfRangeException? expected

strColl.SetItem?(3, str1);

Expect result: MgIndexOutOfRangeException?

Actual result: MgInvalidArgumentException?

Change History (2)

comment:1 Changed 11 years ago by trevorwekel

Owner: changed from Tom Fukushima to trevorwekel
Status: newassigned

comment:2 Changed 11 years ago by trevorwekel

Resolution: fixed
Status: assignedclosed

Patch supplied by Jessica Cao. Fixed in changeset

http://trac.osgeo.org/mapguide/changeset/2569

Note: See TracTickets for help on using tickets.