[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
] [
List Home
]
[aspectj-users] suspicious super call interception
From
: Kristof Jozsa <
kristof.jozsa@xxxxxxxxx
>
Date
: Mon, 28 Sep 2009 11:11:57 +0200
Delivered-to
: aspectj-users@eclipse.org
Dkim-signature
: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=FUU9tnam/vdeYYOFW9xrAiJH1caeyekdI4mF+LVBli8=; b=hxYwRl/dS8Y0MzBMeXIyj3kYrVwPCZ90nDuz5gViXRZp3V1ih9jKFg0oEAqS82nzB4 ziFQuHynZYVLWvV0cARvYHh4Ruxc0CPXsALraQIBsrFhwV32f17/DMz45B1xtocsN6rK 8Qfs7pdl4asyeUy3V8U4V+Pm5Wk7tv6kEs278=
Domainkey-signature
: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=gI4wd/T+cDAwSGESbDd2fZFwSyawCqOCaJ8s/dQyHYqlYxolCBBw/BQgbIIfovbz4R SsZJU2aJT/bOTlim/tF++oTvBhUHQ+k6rSKQrlUyF5GQFE1tdiWKzpPSYKoqbaw5f+t7 oPaxXEhCSeyZMhm39Mwe78v32W40UsKiHqHxM=
Sample code:
public aspect WSPortFixerInterceptor {
ÂÂÂ pointcut wsGetPortCall() :
ÂÂÂ ÂÂÂ call(Object javax.xml.ws.Service+.getPort(..));
ÂÂÂ
ÂÂÂ Object around() : wsGetPortCall() {
ÂÂÂ ÂÂÂ return WsClientTool.getInstance().fixWebServicePort(proceed());ÂÂ // never mind this line
ÂÂÂ }
ÂÂÂ
ÂÂÂ /** private inner class to verify correct interception */
ÂÂÂ @SuppressWarnings("unused")
ÂÂÂ private static class TestFixer {
ÂÂÂ ÂÂÂ {
ÂÂÂ ÂÂÂ ÂÂÂ new Service(null, null) {
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ @SuppressWarnings("unused")
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ public void boo() {
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ super.getPort(null);ÂÂÂ // (1)
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ getPort(null);ÂÂÂÂÂÂÂÂÂÂÂÂ // (2)
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ }
ÂÂÂ ÂÂÂ ÂÂÂ };
ÂÂÂ ÂÂÂ }
ÂÂÂ }
}
To my best knowledge, the two calls at (1) and (2) does the very same in Java, but appearently (2) gets intercepted by this aspect and (1) does not.. what's the explanation for this behaviour?
thanks,
K
Follow-Ups
:
Re: [aspectj-users] suspicious super call interception
From:
Andy Clement
Prev by Date:
Re: [aspectj-users] LTW into javax.swing
Next by Date:
Re: [aspectj-users] LTW into javax.swing
Previous by thread:
[aspectj-users] declare error & type pattern?
Next by thread:
Re: [aspectj-users] suspicious super call interception
Index(es):
Date
Thread