Community
Participate
Working Groups
First off the -XlazyTjp option works and either makes the AspectJ program faster or doesn't make it slower, so it should be the default rather than having to be specified by a command line option. Next, the lint message that is supposed to be generated when a piece of before advice could have been lazy but isn't, due to a piece of around advice on the same join point, isn't generated if that around advice uses 'thisJoinPoint'. A Code example: public aspect Scenario5 { public static boolean enabled = true; pointcut toBeTraced() : execution(* *(..)) && !within(Scenario5); before () : toBeTraced() && if(enabled) { Object[] args = thisJoinPoint.getArgs(); // because of the around advice below this isn't made lazily System.out.println(thisJoinPoint + ", arg's: " + args.length); } Object around() : toBeTraced() && if(enabled) { Object[] args = thisJoinPoint.getArgs(); // only with this line commented out is the Xlint warning produced though! return proceed(); } } class Test{ static void main(String [] args){ }
Have patch from Andrew - integrate for M3.
Created attachment 20633 [details] Fix to make Xlazytjp the default Needs a deprecated style message if the option is used - to indicate it is now the default. personally, I might have made it 'default' to true further down the infrastructure rather than in the options parsing code.
Also: Note that the help printed out when you call ajc with just the -X switch should be updated (it should say (depricated) after the bit about -XlazyTjp). - I forgot to add this in the patch I made
moving to do before 1.5.0 final..
assigning P2 for run-up to AJ 5 RC 1
I'm currently integrating this patch.
committed! I'm not positive the new lint warnings are correct, but they are a start. They are all on ignore by default - we'll see how people get on with them.
Ok - this is now the default in AspectJ. Build is available. The usefulness of any xlints can be addressed in other bugs....