Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] declare warning

If i would parse a directed graph out of this then it would look like:

Foo.foo() --> System.currentTimeMillis()
Foo.foo() --> Foo.bar()
Foo.foo() --> Foo.baz() * 
Foo.bar() --> Foo.baz() * 
Foo.baz() --> System.out.println()

* selected joinpoints (errors)

But again it's theoretical

Op woensdag 25 februari 2004 22:29, schreef u:
> (private message)
>
> consider this case...
>
> public class Foo {
>
> 	void foo() {
> 		if( (System.currentTimeMillis() % 2) == 0 )
> 			bar();
> 		else
> 			baz();
> 	}
>
> 	void bar() { baz(); }
>
> 	void baz() { System.out.println("x"); }
>
> }
>
> aspect Mumble {
>
> 	declare error: cflow(void Foo.bar()) && call(void Foo.baz()): "Can't
> know.";
>
> }



Back to the top