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

Bug 328931

Summary: java.lang.IndexOutOfBoundsException when evaluating some template
Product: [Modeling] Acceleo Reporter: Fabien Giquel <fabien.giquel>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, nicolas.bros
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 328932    
Attachments:
Description Flags
Stack Trace
none
a module for having again the error
none
A simple .ecore file as entry for having the error none

Description Fabien Giquel CLA 2010-10-28 10:11:36 EDT
I encounter an issue with Eclipse 3.6 SR1 and Acceleo 3.0.1v201009150438 :

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

with a simple template :

[template public writeBrackets(o : EClass, d : Integer)]
[if (d > 0)][o.writeBrackets(d-1) before ('[]')/][/if]
[/template]

The issue seems to come from if evaluation.
The issue does not occur with Eclipse 3.7 and Acceleo 3.1.0.

I attach the stack trace, a simple .mtl and .ecore to obtain the error.
Comment 1 Fabien Giquel CLA 2010-10-28 10:12:48 EDT
Created attachment 181948 [details]
Stack Trace
Comment 2 Fabien Giquel CLA 2010-10-28 10:14:05 EDT
Created attachment 181951 [details]
a module for having again the error
Comment 3 Fabien Giquel CLA 2010-10-28 10:14:33 EDT
Created attachment 181952 [details]
A simple .ecore file as entry for having the error
Comment 4 Laurent Goubet CLA 2010-10-30 12:23:08 EDT
Hi Fabien,

The stack trace looks familiar, and the failure itself reminds me of an issue we had with implicit arguments, yet the use case is slightly different. We'll have to test this before we can determine whether this can be fixed in the 3.0 branch.
Comment 5 Laurent Goubet CLA 2011-01-25 08:16:05 EST
Couldn't be reproduced on Eclipse 3.6 with Acceleo 3.0.2