Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356378

Summary: ArraySizeException on resize of array functions
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.