Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328931 - java.lang.IndexOutOfBoundsException when evaluating some template
Summary: java.lang.IndexOutOfBoundsException when evaluating some template
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 328932
  Show dependency tree
 
Reported: 2010-10-28 10:11 EDT by Fabien Giquel CLA
Modified: 2011-01-25 08:16 EST (History)
2 users (show)

See Also:


Attachments
Stack Trace (9.71 KB, text/plain)
2010-10-28 10:12 EDT, Fabien Giquel CLA
no flags Details
a module for having again the error (363 bytes, application/octet-stream)
2010-10-28 10:14 EDT, Fabien Giquel CLA
no flags Details
A simple .ecore file as entry for having the error (317 bytes, application/octet-stream)
2010-10-28 10:14 EDT, Fabien Giquel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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