Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » @AfterReturing not reached
@AfterReturing not reached [message #1760363] Wed, 26 April 2017 11:42
None None is currently offline None NoneFriend
Messages: 1
Registered: April 2017
Junior Member
I've created this aspect:

    @Pointcut("execution(**.* (..))")
	public void resourcesCut() {}

I'm trying to get execution after they has been returned:

    @AfterReturning(pointcut="resourcesCut()", returning="result")
	public void afterReturning(JoinPoint joinPoint, Object result)
		this.logAfterReturningTrace(joinPoint, result);

My class is:

    public class EmailResources {
    	@Inject private ConfigurationResources configurationResources;
    	@Inject protected TokenResources cipheringResources;
    	public String buildURI(String id, byte[] token) throws URISyntaxException
    	    return "";
    	public byte[] decodeParameter(String value)
    		return "";
    	public void sendActivationMail(User user) throws MailGenerationException

However, they are never reached.

Nevertheless, if I add an `@Before`:

	public void beforeCreate(JoinPoint joinPoint) {

it's reached!

I've also added an @AfterThrowing advice and it's able to wrap up to 39 points. However, my @AfterReturning only 6! I've attached images.



Any ideas?
Previous Topic:Aspect not getting detected by Apache Tomcat 8.5.x
Next Topic:AspectJ Logger under existing project.
Goto Forum:

Current Time: Wed Mar 21 07:23:38 GMT 2018

Powered by FUDForum. Page generated in 0.01486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software