On 3 November 2011 06:47, Jean-Pierre Bergamin <
jpbergamin@xxxxxxxxx> wrote:
> Hello everyone
> I'm fighting with spring security and aspectj joinpoints and have no idea
> why our joinpoint declaration does not match.
> We have the following class and interface structure:
> 8<-----------------------------
> public interface ILookupRepository<T> {
> Iterable<T> findAll();
> }
> public interface IBaseRepository<T> extends ILookupRepository<T> { }
> public abstract class AbstractBaseRepository<T> {
> Iterable<T> findAll();
> }
> public interface IFooRepository extends IBaseRepository<Foo> { }
> public class FooRepository extends AbstractBaseRepository<Foo> implements
> IFooRepository { }
> 8<-----------------------------
> I now want to match calls to findAll of IFooRepository and use this
> _expression_:
> execution(* com.example.IFooRepository.findAll(..))
> This pattern does not match when calling
> IFooRepository repo = ...
> repo.findAll();
> The signatures that are found and compared against in
> SignaturePattern.matches are the following:
> Iterable
> net.junisphere.eranger.domain.internal.neo4j.repositories.AbstractBaseRepository.findAll()
> Iterable<IBaseEntity> com.example.IBaseRepository<IBaseEntity>.findAll()
> Iterable<IBaseEntity> com.example.ILookupRepository<IBaseEntity>.findAll()
> Iterable com.example.ILookupRepository<IBaseEntity>.findAll()
> Iterable<net.junisphere.eranger.domain.model.IBaseEntity>
> com.example.ILookupRepository<IBaseEntity>.findAll()
> Iterable com.example.ILookupRepository<IBaseEntity>.findAll()
>
> Any ideas why the IFooRepository is not taken into account, but only
> IBaseRepository and ILookupRepository?
>
> Best regards,
> James