yyang-talend / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

AOP - Invoking a method more than once doesn't fire the invoker anymore #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
*What steps will reproduce the problem?

1. Aspectable class :

public class DummyModel implements Aspectable {

    private String string1;

    public void setString1(String string1) {
        this.string1 = string1;
    }
}
------------------------------------------
2. Interceptor class :

@Aspect
public class HasHistoryInterceptor {

    @After("execution(* *.set*(..))")
    public void afterCall(MethodInvocation invocation) {

        System.out.println("Just called a setter");

    }

}
------------------------------------------
3. Do:
    public void testAOP(){

        final DummyModel model = GWT.create(DummyModel.class);

        model.setString1("state1");
        model.setString1("state2");
    }

*What is the expected output? What do you see instead?

The afterCall method in the Interceptor class in only fired once.

The only output I have with the System.out.println is: 

Just called a setter

Where I should have:

Just called a setter
Just called a setter

*What version of the product are you using? On what operating system?
gwtent-1.0.0RC1

Original issue reported on code.google.com by Nicholas...@gmail.com on 21 Sep 2010 at 3:12

GoogleCodeExporter commented 8 years ago

Original comment by JamesLuo...@gmail.com on 21 Sep 2010 at 10:58