[mapguide-trac] #350: Expected MgIndexOutOfRangeException is not thrown by calling MgStringCollection:: SetItem() with an index out of range.

MapGuide Open Source trac_mapguide at osgeo.org
Thu Nov 29 23:45:56 EST 2007


#350: Expected MgIndexOutOfRangeException is not thrown by calling
MgStringCollection:: SetItem()  with an index out of range.
--------------------------+-------------------------------------------------
   Reporter:  jessicacao  |       Owner:  Tom Fukushima              
       Type:  defect      |      Status:  new                        
   Priority:  medium      |   Milestone:  2.0                        
  Component:  General     |     Version:                             
   Severity:  major       |    Keywords:  MgStringCollection::SetItem
External_id:  985059      |  
--------------------------+-------------------------------------------------
 Expected MgIndexOutOfRangeException is not thrown but
 MgInvalidArgumentException by calling MgStringCollection:: SetItem() with
 an index out of range.

 Step to recur:[[BR]]

 1.      Construct a MgStringCollection and add a string object into
 it.[[BR]]

 2.      Call SetItem() with an index out of range.[[BR]][[BR]]


 Sample code:

 MgStringCollection strColl = new MgStringCollection();[[BR]]

 string str1 = "string1";[[BR]]

 strColl.Add(str1);

 // MgIndexOutOfRangeException expected[[BR]]

 strColl.SetItem(3, str1);

 Expect result:  MgIndexOutOfRangeException[[BR]]

 Actual result:  MgInvalidArgumentException

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/350>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list