Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329357 - CountedUnit shouldn't throw NullPointerException when count > number of times contents can be executed
Summary: CountedUnit shouldn't throw NullPointerException when count > number of times...
Status: RESOLVED FIXED
Alias: None
Product: EMFT.Henshin
Classification: Modeling
Component: Interpreter (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-03 10:50 EDT by Felix Rieger CLA
Modified: 2010-11-04 08:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Rieger CLA 2010-11-03 10:50:49 EDT
When setting the count value of a CountedUnit to a value greater than the number of counts its contents can be executed/applied, execution of the CountedUnit will throw a NullPointerException as soon as the remaining number of loop executions is not 0 and its contents can not be applied.
This is a somewhat unexpected behaviour; when count is set to -1 to specify an infinite loop, execution just stops if there is no Rule/TransformationUnit to be applied/executed in its body without throwing a NullPointerException.

Suggested solution: Either allow setting a parameter to control whether an Exception is thrown (current behaviour) or execution just stops (behaviour for count = -1), or just stop execution of the CountedUnit.
Comment 1 Enrico Biermann CLA 2010-11-04 08:46:17 EDT
I have fixed this bug.