<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<!-- MHonArc v2.6.10 -->
	<channel>
		<title>ajdt-dev</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/maillist.html</link>
		<description>ajdt-dev</description>
		<language>en-us</language>
		<pubDate>Sat, 05 May 2012 04:12:15 GMT</pubDate>
		<lastBuildDate>Sat, 05 May 2012 04:12:15 GMT</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>MHonArc RSS 2.0 RCFile</generator>
		<managingEditor>webmaster@eclipse.org (Webmaster)</managingEditor>
		<webMaster>webmaster@eclipse.org (Webmaster)</webMaster>
		<image>
			<title>ajdt-dev</title>
			<url>http://www.eclipse.org/eclipse.org-common/themes/Phoenix/images/eclipse_home_header.jpg</url>
			<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/maillist.html</link>
		</image>
 

	<item>
		<title>[ajdt-dev] Project meta data is out of date for tools.ajdt</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01624.html</link>
		<description>Andrew, Projects are required to keep meta data up to date using the MyFoundation Portal (http://portal.eclipse.org/). The following problems were found with this project's meta-data: * The date for release &amp;quot;2.2.0&amp;quot; is in the past, but the release is not ma...</description>
		<content:encoded><![CDATA[<pre>Andrew,
Projects are required to keep meta data up to date using the MyFoundation
Portal (<a  href="http://portal.eclipse.org/">http://portal.eclipse.org/</a>).  The following problems were found
with this project's meta-data:

* The date for release &quot;2.2.0&quot; is in the past, but the release is not
marked as completed. If it is completed, it should be marked as completed;
if it has been postponed, it should be given a new target date.
* There is no next/future release of this project. All Eclipse projects
must have a &quot;next release&quot; planned and scheduled.


</pre>]]></content:encoded>
		<pubDate>Sat, 05 May 2012 04:00:15 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01624.html</guid>
		<author>emo@xxxxxxx (portal on behalf of emo)</author>
	</item>


	<item>
		<title>[ajdt-dev] Project meta data is out of date for tools.ajdt</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01623.html</link>
		<description>Andrew, Projects are required to keep meta data up to date using the MyFoundation Portal (http://portal.eclipse.org/). The following problems were found with this project's meta-data: * The date for release &amp;quot;2.2.0&amp;quot; is in the past, but the release is not ma...</description>
		<content:encoded><![CDATA[<pre>Andrew,
Projects are required to keep meta data up to date using the MyFoundation
Portal (<a  href="http://portal.eclipse.org/">http://portal.eclipse.org/</a>).  The following problems were found
with this project's meta-data:

* The date for release &quot;2.2.0&quot; is in the past, but the release is not
marked as completed. If it is completed, it should be marked as completed;
if it has been postponed, it should be given a new target date.
* There is no next/future release of this project. All Eclipse projects
must have a &quot;next release&quot; planned and scheduled.


</pre>]]></content:encoded>
		<pubDate>Thu, 05 Apr 2012 04:00:15 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01623.html</guid>
		<author>emo@xxxxxxx (portal on behalf of emo)</author>
	</item>


	<item>
		<title>[ajdt-dev] Project meta data is out of date for tools.ajdt</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01622.html</link>
		<description>Andrew, Projects are required to keep meta data up to date using the MyFoundation Portal (http://portal.eclipse.org/). The following problems were found with this project's meta-data: * The date for release &amp;quot;2.2.0&amp;quot; is in the past, but the release is not ma...</description>
		<content:encoded><![CDATA[<pre>Andrew,
Projects are required to keep meta data up to date using the MyFoundation
Portal (<a  href="http://portal.eclipse.org/">http://portal.eclipse.org/</a>).  The following problems were found
with this project's meta-data:

* The date for release &quot;2.2.0&quot; is in the past, but the release is not
marked as completed. If it is completed, it should be marked as completed;
if it has been postponed, it should be given a new target date.
* There is no next/future release of this project. All Eclipse projects
must have a &quot;next release&quot; planned and scheduled.


</pre>]]></content:encoded>
		<pubDate>Mon, 05 Mar 2012 05:00:06 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01622.html</guid>
		<author>emo@xxxxxxx (portal on behalf of emo)</author>
	</item>


	<item>
		<title>Re: [ajdt-dev] ajdt+groovy-eclipse</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01621.html</link>
		<description> </description>
		<content:encoded><![CDATA[<pre>Hi Steve,

The bug you are looking for is this one:
<a  href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287092">https://bugs.eclipse.org/bugs/show_bug.cgi?id=287092</a>

&gt; Is it possible to run AJDT and Eclipse-Groovy in the same project?&#xA0; Or
&gt; rather is it possible to ever do this in the future?&#xA0; Or are there
&gt; underlying limitations of eclipse that would prevent this?

The limitations are simply that: Groovy-Eclipse patches
org.eclipse.jdt.core; AspectJ uses a branch of jdt core called
org.aspectj.org.eclipse.jdt.core.  This means when you switch your
project to AspectJ (and it switches compiler) it starts using one that
doesn't have the groovy-eclipse changes in.  And when you switch your
project back to groovy you don't have a compiler that is Aspect aware.

In theory it is just a task of taking the patches made to
org.eclipse.jdt.core and applying them to the org.aspectj copy of jdt
core - but we never find the time.

It sounds like you do want the weaver to weave into the groovy code
(rather than just using groovy for scripts which could possibly be
made to work in an easier way).  If you were able to split the
project, you could maybe get something working.  Groovy in one
project, then use 'inpath' on the AspectJ project to consume the
groovy compiled code and include it in the output of the AspectJ
project.

So we know what the challenge is, but it doesn't ever seem to reach
the top of the priority list...

cheers
Andy

On 29 February 2012 07:42, Steve Ash &lt;stevemash@xxxxxxxxx&gt; wrote:
&gt;
&gt; I looked for anything existing in the codehaus jira for groovy+eclipse as
&gt; well as the bugzilla tracker for AJDT and didn't find anything related, even
&gt; though I'm sure its come up before.&#xA0; So I will ask, and apologize if its
&gt; already been covered extensively.
&gt;
&gt; Is it possible to run AJDT and Eclipse-Groovy in the same project?&#xA0; Or
&gt; rather is it possible to ever do this in the future?&#xA0; Or are there
&gt; underlying limitations of eclipse that would prevent this?
&gt;
&gt; Since we do (and want to continue doing) compile time weaving-- I guess our
&gt; best option is to use load time weaving in eclipse for junit etc and then
&gt; use re-weaving at compile time to weave aspects into the bytecode coming out
&gt; of eclipse-groovy compiler?
&gt;
&gt; For us the only aspects that we use are @Transactional and others that are
&gt; still compilable as java code by javac -- so maven-groovy should be able to
&gt; handle it.
&gt;
&gt; But this is still a pretty big departure from our current toolchain (just
&gt; straight aspectj and AJDT) so I am hoping there is a better option or plans
&gt; for one, since you guys are one in the same, I think.
&gt;
&gt; Thanks,
&gt;
&gt; Steve
&gt;
&gt;
&gt; _______________________________________________
&gt; ajdt-dev mailing list
&gt; ajdt-dev@xxxxxxxxxxx
&gt; <a  href="https://dev.eclipse.org/mailman/listinfo/ajdt-dev">https://dev.eclipse.org/mailman/listinfo/ajdt-dev</a>
&gt;

</pre>]]></content:encoded>
		<pubDate>Wed, 29 Feb 2012 18:03:54 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01621.html</guid>
		<author>andrew.clement@xxxxxxx (Andy Clement)</author>
	</item>
	<item>
		<title>[ajdt-dev] ajdt+groovy-eclipse</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01620.html</link>
		<description>I looked for anything existing in the codehaus jira for groovy+eclipse as well as the bugzilla tracker for AJDT and didn&amp;#39;t find anything related, even though I&amp;#39;m sure its come up before.&amp;#xA0; So I will ask, and apologize if its already been covered extensively...</description>
		<content:encoded><![CDATA[<br><div class="gmail_quote">I looked for anything existing in the codehaus jira for groovy+eclipse as well as the bugzilla tracker for AJDT and didn&#39;t find anything related, even though I&#39;m sure its come up before.&#xA0; So I will ask, and apologize if its already been covered extensively.<br>

<br>Is it possible to run AJDT and Eclipse-Groovy in the same project?&#xA0; Or rather is it possible to ever do this in the future?&#xA0; Or are there underlying limitations of eclipse that would prevent this?<br><br>Since we do (and want to continue doing) compile time weaving-- I guess our best option is to use load time weaving in eclipse for junit etc and then use re-weaving at compile time to weave aspects into the bytecode coming out of eclipse-groovy compiler?<br>

<br>For us the only aspects that we use are @Transactional and others that are still compilable as java code by javac -- so maven-groovy should be able to handle it.<br><br>But this is still a pretty big departure from our current toolchain (just straight aspectj and AJDT) so I am hoping there is a better option or plans for one, since you guys are one in the same, I think.<br>

<br>Thanks,<br><br>Steve<br>
</div><br>
]]></content:encoded>
		<pubDate>Wed, 29 Feb 2012 15:42:18 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01620.html</guid>
		<author>stevemash@xxxxxxx (Steve Ash)</author>
	</item>


	<item>
		<title>Re: [ajdt-dev] Some @aspectj advices leading to some runtime errors</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01619.html</link>
		<description> </description>
		<content:encoded><![CDATA[<pre>Hi,

I would raise AspectJ bugzillas, perhaps one for the proceed problem
and one for the line number debug information being incorrect.

Code style aspects can do more checking around the proceed() call.  If
you are using annotation style we would have to generate checking code
that ran at runtime, to avoid errors like this:

&gt; Exception in thread &quot;main&quot; java.lang.ArrayIndexOutOfBoundsException: 1

we don't generate that code and so unless you get the right
incantation for your proceed parameters it will manifest as nasty
runtime failures. There have been several bugs in this area over the
years, it needs a big refactoring.

&gt; Shouldn't this be :
&gt;
&gt; state[hasThis ? 1 : 0] = adviceBindings[bindThis ? 1 : 0];

could be.  If that fixes all your tests and doesn't break any of the
AspectJ tests, we can put it in.  If you could attach patches to the
bugzilla that would be great.  if you want I can show you how to
create AspectJ testcases that you could also contribute back to the
regression test suite.

cheers,
Andy

On 10 January 2012 03:58,  &lt;ptitjes@xxxxxxx&gt; wrote:
&gt; Hi list,
&gt;
&gt; Glad to use AspectJ in one of our project!
&gt;
&gt; [I use AJDT 2.2.0.e37x-20120105-1100 with AspectJ version: 1.7.0.20111215190600 in my IDE. And AspectJ 1.6.12 in my production environment]
&gt;
&gt; I encounter some problems with using @aspectj.
&gt; I define the following example class in a simple AspectJ project.
&gt;
&gt; &lt;code&gt;
&gt; package foo;
&gt;
&gt; public class Test {
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public final static void main(String[] args) {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Test test = new Test();
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;System.out.println(test.runTest());
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public int runTest() {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;return this.test(5);
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public int test(int i) {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;return i;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt; }
&gt; &lt;/code&gt;
&gt;
&gt; Then I tried different way of pointcuting the int test(int) method. I describe each time what I observe bellow.
&gt;
&gt; 1. Using neither args() nor this()
&gt;
&gt; &lt;code&gt;
&gt; package foo;
&gt;
&gt; import org.aspectj.lang.ProceedingJoinPoint;
&gt; import org.aspectj.lang.annotation.Around;
&gt; import org.aspectj.lang.annotation.Aspect;
&gt; import org.aspectj.lang.annotation.Pointcut;
&gt;
&gt; @Aspect
&gt; public class TestAspect {
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;+ &quot; target(test)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;void testPointcut(Test test) {}
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Around(&quot;testPointcut(test)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public Object doTest(final ProceedingJoinPoint jp,
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Test test) throws Throwable {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;return jp.proceed(new Object[] { test });
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt; }
&gt; &lt;/code&gt;
&gt;
&gt; Exception in thread &quot;main&quot; java.lang.ArrayIndexOutOfBoundsException: 1
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.test_aroundBody1$advice(Test.java:18)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.runTest(Test.java:11)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.main(Test.java:7)
&gt;
&gt;
&gt; 2. Using args() but no this()
&gt;
&gt; From reading the docs this code is correct.
&gt;
&gt; &lt;code&gt;
&gt; package foo;
&gt;
&gt; import org.aspectj.lang.ProceedingJoinPoint;
&gt; import org.aspectj.lang.annotation.Around;
&gt; import org.aspectj.lang.annotation.Aspect;
&gt; import org.aspectj.lang.annotation.Pointcut;
&gt;
&gt; @Aspect
&gt; public class TestAspect {
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;+ &quot; target(test) &amp;&amp; args(i)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;void testPointcut(Test test, int i) {}
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Around(&quot;testPointcut(test, i)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public Object doTest(final ProceedingJoinPoint jp,
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Test test, int i) throws Throwable {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;return jp.proceed(new Object[] { test, i * 2 });
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt; }
&gt; &lt;/code&gt;
&gt;
&gt; Exception in thread &quot;main&quot; java.lang.ClassCastException: java.lang.Integer cannot be cast to foo.Test
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.test_aroundBody1$advice(Test.java:18)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.runTest(Test.java:11)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;at foo.Test.main(Test.java:7)
&gt;
&gt; 3. Using args() and this()
&gt;
&gt; &lt;code&gt;
&gt; package foo;
&gt;
&gt; import org.aspectj.lang.ProceedingJoinPoint;
&gt; import org.aspectj.lang.annotation.Around;
&gt; import org.aspectj.lang.annotation.Aspect;
&gt; import org.aspectj.lang.annotation.Pointcut;
&gt;
&gt; @Aspect
&gt; public class TestAspect {
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;+ &quot; target(test) &amp;&amp; args(i)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;void testPointcut(Test test, int i) {}
&gt;
&gt; &#xA0; &#xA0; &#xA0; &#xA0;@Around(&quot;testPointcut(test, i) &amp;&amp; this(t)&quot;)
&gt; &#xA0; &#xA0; &#xA0; &#xA0;public Object doTest(final ProceedingJoinPoint jp,
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Test test, int i, Object t) throws Throwable {
&gt; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;return jp.proceed(new Object[] { t, test, i * 2 });
&gt; &#xA0; &#xA0; &#xA0; &#xA0;}
&gt; }
&gt; &lt;/code&gt;
&gt;
&gt; This version works as expected. However, it seems that the generated bytecode during weaving incorrectly builds the debug line markers as if you put a breakpoint in the advice, Eclise don't suspend inside the advice code but elsewhere in the Test class code. Also, when you try to step (in a blind way) in the code from a breakpoint in runTest(), you can observe there is somewhat a mismatch in the variable handling...
&gt;
&gt; Should I raise a bug for all that ?
&gt;
&gt; After playing with AspectJ source code (version 1.6.12), I suspect there might be a bug in the weaver but also in line 202 of JoinPointImpl:
&gt;
&gt; state[hasThis ? 1 : 0] = adviceBindings[hasThis ? 1 : 0];
&gt;
&gt; Shouldn't this be :
&gt;
&gt; state[hasThis ? 1 : 0] = adviceBindings[bindThis ? 1 : 0];
&gt;
&gt; Everytime you can replace the faulty proceed(..) call by a no-arg proceed() call and then this works as expected.
&gt;
&gt; Thanks for you help!
&gt; Didier.aj
&gt; _______________________________________________
&gt; ajdt-dev mailing list
&gt; ajdt-dev@xxxxxxxxxxx
&gt; <a  href="https://dev.eclipse.org/mailman/listinfo/ajdt-dev">https://dev.eclipse.org/mailman/listinfo/ajdt-dev</a>

</pre>]]></content:encoded>
		<pubDate>Tue, 10 Jan 2012 17:25:03 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01619.html</guid>
		<author>andrew.clement@xxxxxxx (Andy Clement)</author>
	</item>
	<item>
		<title>[ajdt-dev] Some @aspectj advices leading to some runtime errors</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01618.html</link>
		<description>Hi list, Glad to use AspectJ in one of our project! [I use AJDT 2.2.0.e37x-20120105-1100 with AspectJ version: 1.7.0.20111215190600 in my IDE. And AspectJ 1.6.12 in my production environment] I encounter some problems with using @aspectj. I define the foll...</description>
		<content:encoded><![CDATA[<pre>Hi list,

Glad to use AspectJ in one of our project!

[I use AJDT 2.2.0.e37x-20120105-1100 with AspectJ version: 1.7.0.20111215190600 in my IDE. And AspectJ 1.6.12 in my production environment]

I encounter some problems with using @aspectj.
I define the following example class in a simple AspectJ project.

&lt;code&gt;
package foo;

public class Test {

        public final static void main(String[] args) {
                Test test = new Test();
                System.out.println(test.runTest());
        }

        public int runTest() {
                return this.test(5);
        }

        public int test(int i) {
                return i;
        }
}
&lt;/code&gt;

Then I tried different way of pointcuting the int test(int) method. I describe each time what I observe bellow.

1. Using neither args() nor this()

&lt;code&gt;
package foo;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class TestAspect {

        @Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
                        + &quot; target(test)&quot;)
        void testPointcut(Test test) {}

        @Around(&quot;testPointcut(test)&quot;)
        public Object doTest(final ProceedingJoinPoint jp,
                        Test test) throws Throwable {
                return jp.proceed(new Object[] { test });
        }
}
&lt;/code&gt;

Exception in thread &quot;main&quot; java.lang.ArrayIndexOutOfBoundsException: 1
        at foo.Test.test_aroundBody1$advice(Test.java:18)
        at foo.Test.runTest(Test.java:11)
        at foo.Test.main(Test.java:7)


2. Using args() but no this()

&gt;From reading the docs this code is correct.

&lt;code&gt;
package foo;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class TestAspect {

        @Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
                        + &quot; target(test) &amp;&amp; args(i)&quot;)
        void testPointcut(Test test, int i) {}

        @Around(&quot;testPointcut(test, i)&quot;)
        public Object doTest(final ProceedingJoinPoint jp,
                        Test test, int i) throws Throwable {
                return jp.proceed(new Object[] { test, i * 2 });
        }
}
&lt;/code&gt;

Exception in thread &quot;main&quot; java.lang.ClassCastException: java.lang.Integer cannot be cast to foo.Test
        at foo.Test.test_aroundBody1$advice(Test.java:18)
        at foo.Test.runTest(Test.java:11)
        at foo.Test.main(Test.java:7)

3. Using args() and this()

&lt;code&gt;
package foo;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class TestAspect {

        @Pointcut(&quot;call(int foo.Test.test(int)) &amp;&amp; &quot;
                        + &quot; target(test) &amp;&amp; args(i)&quot;)
        void testPointcut(Test test, int i) {}

        @Around(&quot;testPointcut(test, i) &amp;&amp; this(t)&quot;)
        public Object doTest(final ProceedingJoinPoint jp,
                        Test test, int i, Object t) throws Throwable {
                return jp.proceed(new Object[] { t, test, i * 2 });
        }
}
&lt;/code&gt;

This version works as expected. However, it seems that the generated bytecode during weaving incorrectly builds the debug line markers as if you put a breakpoint in the advice, Eclise don't suspend inside the advice code but elsewhere in the Test class code. Also, when you try to step (in a blind way) in the code from a breakpoint in runTest(), you can observe there is somewhat a mismatch in the variable handling...

Should I raise a bug for all that ?

After playing with AspectJ source code (version 1.6.12), I suspect there might be a bug in the weaver but also in line 202 of JoinPointImpl:

state[hasThis ? 1 : 0] = adviceBindings[hasThis ? 1 : 0];

Shouldn't this be :

state[hasThis ? 1 : 0] = adviceBindings[bindThis ? 1 : 0];

Everytime you can replace the faulty proceed(..) call by a no-arg proceed() call and then this works as expected.

Thanks for you help!
Didier.aj

</pre>]]></content:encoded>
		<pubDate>Tue, 10 Jan 2012 11:58:08 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01618.html</guid>
		<author>ptitjes@xxxxxxx (ptitjes)</author>
	</item>


	<item>
		<title>[ajdt-dev] Project meta data is out of date for tools.ajdt</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01617.html</link>
		<description>Andrew, Projects are required to keep meta data up to date using the MyFoundation Portal (http://portal.eclipse.org/). The following problems were found with this project's meta-data: * The date for release &amp;quot;2.2.0&amp;quot; is in the past, but the release is not ma...</description>
		<content:encoded><![CDATA[<pre>Andrew,
Projects are required to keep meta data up to date using the MyFoundation
Portal (<a  href="http://portal.eclipse.org/">http://portal.eclipse.org/</a>).  The following problems were found
with this project's meta-data:

* The date for release &quot;2.2.0&quot; is in the past, but the release is not
marked as completed. If it is completed, it should be marked as completed;
if it has been postponed, it should be given a new target date.
* There is no next/future release of this project. All Eclipse projects
must have a &quot;next release&quot; planned and scheduled.


</pre>]]></content:encoded>
		<pubDate>Thu, 05 Jan 2012 05:00:16 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01617.html</guid>
		<author>emo@xxxxxxx (portal on behalf of emo)</author>
	</item>


	<item>
		<title>[ajdt-dev] First AJDT snapshot release with AspectJ 1.7</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01616.html</link>
		<description>Hi all, We now have a first usable snapshot release of AJDT with AspectJ 1.7 available on the dev update site: http://download.eclipse.org/tools/ajdt/37/dev/update/ All tests are passing and we have done a simple smoke test. &amp;#xA0;It is now at a stage where we ...</description>
		<content:encoded><![CDATA[<pre>Hi all,

We now have a first usable snapshot release of AJDT with AspectJ 1.7
available on the dev update site:
<a  href="http://download.eclipse.org/tools/ajdt/37/dev/update/">http://download.eclipse.org/tools/ajdt/37/dev/update/</a>

All tests are passing and we have done a simple smoke test. &#xA0;It is now
at a stage where we want to get feedback from the community. &#xA0;So,
please try out the new AJDT and let us know if you have any issues
(with the Eclipse tools or with the compiler). &#xA0;Thanks.

Andrew

</pre>]]></content:encoded>
		<pubDate>Fri, 16 Dec 2011 16:40:50 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01616.html</guid>
		<author>andrew@xxxxxxx (Andrew Eisenberg)</author>
	</item>


	<item>
		<title>Re: [ajdt-dev] Android with AspectJ and building it with Ant on	Eclipse</title>
		<link>http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01615.html</link>
		<description> </description>
		<content:encoded><![CDATA[<pre>I took a bit of a look at your situation.  It is expected that aspects
coming in from the aspect path will have warnings on all the advices.
This is because the aspect project itself does not know that it is on
the aspect path of any other project.  However, if you open your
target project, you will see that the appropriate targets have aspectj
gutter markers.    This project does know about aspects coming from
the aspect path.

So, take a look at your target project, and if you see aspectj gutter
markers, then things should be working appropriately.  However, I
don't really know how the android compiler works.  There may be some
extra code generation going on.  It may work on source code, not byte
code and will therefore not know how to handle aspects.



On Fri, Dec 9, 2011 at 11:26 AM, Sam Xiao &lt;s.xiao@xxxxxxxxxxxxxxx&gt; wrote:
&gt; Hi all,
&gt;
&gt;
&gt;
&gt; Nice to meet everyone here!
&gt;
&gt;
&gt;
&gt; I'm new to Android and wanted to use AspectJ with it. I had searched couple
&gt; articles online and follow the instruction to have it working:
&gt; <a  href="http://blog.punegtug.org/2010/11/adding-aspect-to-android.html">http://blog.punegtug.org/2010/11/adding-aspect-to-android.html</a>
&gt;
&gt;
&gt;
&gt; But I wanted to know whether if it's possible to separate the aspects away
&gt; from the Android project. In the tutorial link above, it has both the
&gt; Android App and the aspects inside the same project, but in many cases, we
&gt; wanted to leave the Android Project untouched in its isolating spaces.
&gt;
&gt;
&gt;
&gt; Let said I have AndroidProject in my Eclipse workspace, I would like to
&gt; create a separate projects for my aspects called something like
&gt; &quot;AndroidAspectProject&quot; which only contains the aspects for it.
&gt;
&gt;
&gt;
&gt; I'm not sure whether this would work because it seems we need to let AspectJ
&gt; compiler inject point cuts and advices to the .class files before creating
&gt; the .dex files. In this sense, I may not able to do it in a separate
&gt; project.
&gt;
&gt;
&gt;
&gt; Does anyone try with this?
&gt;
&gt;
&gt;
&gt; Another related question would be: Is it possible to have Ant build the
&gt; AndroidProject with AND without aspects on it? Can this be done outside of
&gt; Eclipse?
&gt;
&gt; I'm looking for a way to build different flavours as I'm only injecting
&gt; pointcuts into the AndroidProject on dev/debug build, but will leave it
&gt; untouched on release build.
&gt;
&gt;
&gt;
&gt; I had already asked such question on Stackoverflow:
&gt; <a  href="http://stackoverflow.com/questions/8409425/android-with-aspectj-and-building-it-with-ant-on-eclipse">http://stackoverflow.com/questions/8409425/android-with-aspectj-and-building-it-with-ant-on-eclipse</a>
&gt;
&gt; But I&#x2019;m still stuck to finding the best way to handle my case of building
&gt; AspectJ libraries used in Android Project.
&gt;
&gt;
&gt;
&gt; Andrew Eisenberg (thanks to him, the person who recommended me using this
&gt; mailing list) already provided some advices to my question, however, it
&gt; doesn&#x2019;t really quite working for me as I had errors when I put my *.aj as a
&gt; separate projects in the workspace in Eclipse.
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; Thanks in advanced for any answers for this!
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; Thanks.
&gt;
&gt; Sam Xiao.
&gt;
&gt; Office: 1-408-324-3760
&gt;
&gt;
&gt;
&gt;
&gt; _______________________________________________
&gt; ajdt-dev mailing list
&gt; ajdt-dev@xxxxxxxxxxx
&gt; <a  href="https://dev.eclipse.org/mailman/listinfo/ajdt-dev">https://dev.eclipse.org/mailman/listinfo/ajdt-dev</a>
&gt;

</pre>]]></content:encoded>
		<pubDate>Mon, 12 Dec 2011 16:57:49 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/ajdt-dev/msg01615.html</guid>
		<author>andrew@xxxxxxx (Andrew Eisenberg)</author>
	</item>

 
	</channel>
	</rss>
<!-- MHonArc v2.6.10 -->

