posted 12 years ago
After some more thought, I had to change the aspect up a bit to:
Instead of checking for an empty list at the call, it is checked at execution. Also the aspect is used on a percflow basis so a separate instance of the aspect is created by each submit statement in StartPoint. I separated the two interfaces in case I want to implement of methods that may use this aspect but may only need one of the interfaces. StartPoint was also slightly changed to:
So this is one way lists can be checked to see if they are empty in a program that uses concurrency. I know that the .isEmpty() could've been used, but when you're working with a bunch of lists in a single method .isEmpty() gets redundant and since one of the purposes of AspectJ is to remove this sort of redundant code, I thought this was a good idea.