MapGuide Open Source:  Home |  Download |  Internals

Ticket #350 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

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

Reported by: jessicacao Assigned to: 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.

2. 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

12/07/07 15:42:25 changed by trevorwekel

  • status changed from new to assigned.
  • owner changed from Tom Fukushima to trevorwekel.

12/07/07 15:45:36 changed by trevorwekel

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

Patch supplied by Jessica Cao. Fixed in changeset

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