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

Bug 329357

Summary: CountedUnit shouldn't throw NullPointerException when count > number of times contents can be executed
Product: [Modeling] EMFT.Henshin Reporter: Felix Rieger <riegerf>
Component: InterpreterAssignee: Project Inbox <henshin.interpreter-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.