java


AspectJ: after returning not reached


I've created this aspect:
#Pointcut("execution(* com.living.commty.boot.resources.*.* (..))")
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:
package com.living.commty.boot.resources;
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:
#Before("resourcesCut()")
public void beforeCreate(JoinPoint joinPoint) {
this.logBeforeTrace(joinPoint);
}
it's reached!
ECLIPSE
As you can see into this images:
#AfterThrowing wraps a lot of methods, up to 39, more or less.
But, #AfterReturning only wraps 6 method executions...

Related Links

Are “atomic” and “synchronous” synonyms in programming?
Concurrent output from java application to elasticsearch
Cannot import QWebPage from PyQt5 in Python 3.5
Java Hibernate : Update most recent entry in MySql database
Iterating through XML file using JDOM Return NullPointerException?
Select array fields from Hive table using JDBC
Must a Spring bean represent a unique object?
extracting data java jsoup html
How to edit a jface table which holds a list of string as the model
Release APK error Android Studio
Find value in String[] inside List and erase the String[]
ClassCastException to insert data from combobox in database
parse nodeList Value using Jsoup
Google Map Multiple marker from onMapReady
JavaMelody:DefaultQuartzScheduler has failed to stop it. This is very likely to create a memory leak
Access to HDFS Oozie java action with Kerberos

Categories

HOME
sendgrid
hive
atom-editor
openmp
layout
routes
icloud
bs4
user-input
numeral.js
export-to-csv
quickbooks
apache-cayenne
dynamics-crm-online
iolanguage
libtiff
google-static-maps
firefox-webextensions
reverse-proxy
one-hot-encoding
opencover
p-value
google-cloud-endpoints-v2
textmate
wallpaper
dartium
serve
sharefile
twitch
sqlite2
document.write
opshub
preconditions
email-templates
ncalc
botbuilder
nand2tetris
no-www
midl
azure-application-gateway
veracode
tizen-native-app
nstextview
recursive-datastructures
nativeapplication
magma
feeds
media-player
qtwebview
mako
minimization
specrun
cubes
sts-springsourcetoolsuite
player
qpid
packagist
hexdump
php-internals
tform
freedesktop.org
vhd
teamcity-8.0
python-3.2
fouc
rgeo
interrupted-exception
kineticjs
typeof
valueconverter
hippomocks
marmalade
mysql-error-1062
balanced-payments
cloud-connect
flexmojos
blending
opcache
ril
html4
xamlparseexception
labwindows
viewswitcher
getmessage
bigcouch
qt-jambi
vdsp
coercion
recent-documents
oncheckedchanged
mysql-error-1005
wise
libs
anti-piracy
wsdl.exe

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App