Community
Participate
Working Groups
When using invoke() service, Acceleo try to instanciate the service class. Acceleo never used this instance so shouldn't do this.
Though important, this isn't a blocker
Attached a patch that removes the call to the instanciation service. it uses the implicit object passed as first argument to invoke the correct method on it.
Created attachment 184867 [details] patch for acceleo 3.0 branch
Created attachment 185722 [details] Patch to only instantiate when needed The attached patch takes the approach to the max and only instantiates services when needed. I couldn't test this myself and am in holidays tonight. Could you try this patch so that I can commit it when I return?
tested the patch with 3.0 branch and worked. thanks !
Created attachment 185763 [details] FIX for maintenance and HEAD The associated patch prevents Acceleo from instantiating service instances except when its really needed. This means that calling Java methods defined on the class of the receiver no longer instantiates a new "receiver.getClass()" but directly calls the method on the receiver itself. Likewise, It is now possible to call static Java methods as we no longer need to instantiate their utility Class. Even though this changes APIs, it should be committed on both the 3.0 maintenance branch and the CVS HEAD as it solves many potential bugs with the service invocation.
The fix will be available in both 3.0.2 and 3.1.0M5