| Summary: | NPE when tyring to find most specific template for <null> | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Mikaël Barbero <mikael.barbero> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | mikael.barbero, stephane.begaudeau |
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 290532 *** |
Hello, AcceleoEvaluationEnvironment#getMostSpecificTemplate(List<Template>, List<Object>) may throw a NPE when null is provided in arguments list (second parameter). For instance, within a UML model, I have a template called "gen" [template public gen(e : Property)] [type.referenceName()/] [name()/]; [/template] [template public referenceName(e : PrimitiveType)] p_[name/] [/template] [template public referenceName(e : DataType)] d_[name/] [/template] NPE occurs when trying to find the best referenceName template to call rather than when simply calling referenceName(self.type) in "gen". I'd better see an OclUndefined exception ("can not call referenceName on <OclUndefined>") or something like this before the getMostSpecificTemplate(). Best regards, Mika