Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356378 - ArraySizeException on resize of array functions
Summary: ArraySizeException on resize of array functions
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 14:15 EDT by broy2 CLA
Modified: 2017-02-23 14:20 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-08-31 14:15:10 EDT
Build Identifier: 20110831

Run the following program.
Get: egl.lang.ArraySizeException

program pgm2 type BasicProgram{}
	function main()	
		myNames string[5] { maxSize=3 } = ["matt", "justin", "paul"];
		myNames.resize(2);
	end
end

Reproducible: Always
Comment 1 Matt Heitz CLA 2011-08-31 14:25:08 EDT
Whoops, I thought resize() worked that way in RBD.  I was wrong.  It should only throw an exception when the new size is < 0 or > maxSize.

By the way, a string[5] with maxSize=3 doesn't look like a good idea.
Comment 2 Matt Heitz CLA 2011-08-31 22:58:55 EDT
Fixed, along with a couple other mistakes in the EglList class that you didn't find.
Comment 3 broy2 CLA 2011-09-06 14:24:04 EDT
Verified in 20110906.