Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » file not found in JUnit failure trace
file not found in JUnit failure trace [message #36754] Thu, 27 May 2004 14:45 Go to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
I was writing a few JUnit testcases for a project that contains a
couple of aspects.
One of them fails and while trying to understand why I noticed that
clicking on lines in the stacktrace, which refer to aspectj-code,
e.g.:
-----------------------------
....
at foo.Log.createSignature(Log.aj:62)
....
-----------------------------
yields a strange message:
"Test class not found in selected project."

I have no class called "Test" in my project. I guess JUnit has a
Test-class one, but I don't know why clicking on the above line in the
stacktrace searches for that. Shouldn't it show line 62 in file
Log.aj?

BTW: Clicking on certain other lines, e.g.
-----------------------------
....
at
foo.Log.ajc$inlineAccessMethod$foo_Log$foo_Log$createSignatu re(Log.aj)

....
-----------------------------
yields no reaction at all, i.e. it seems to be ignored completey
(which is probably OK since that seems to be some very aspect-internal
stuff...).

Michael
Re: file not found in JUnit failure trace [message #36788 is a reply to message #36754] Thu, 27 May 2004 14:58 Go to previous message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
It also seems, that if one added methods to a class using an aspect
like:
-----------------
public aspect Xyz {
....
declare parents: Foo implements Bar;

// implementing some method defined by Bar:

public String bar() {
...
}
....
}
-----------------

then the line in the stacktrace erroneously points to the advised
original class anddoes not contain a line number, e.g.:

-----------------
.....
at foo.Foo.bar(Foo.java)

.....
-----------------

instead of :
-----------------
.....
at Xyz.bar(Xyz.aj:123)
.....
-----------------

I guess when it comes to stacktrace reverse translation this whole
bytecode weaving opens not just one but several cans of worms...

Michael
Re: file not found in JUnit failure trace [message #580241 is a reply to message #36754] Thu, 27 May 2004 14:58 Go to previous message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
It also seems, that if one added methods to a class using an aspect
like:
-----------------
public aspect Xyz {
....
declare parents: Foo implements Bar;

// implementing some method defined by Bar:

public String bar() {
...
}
....
}
-----------------

then the line in the stacktrace erroneously points to the advised
original class anddoes not contain a line number, e.g.:

-----------------
.....
at foo.Foo.bar(Foo.java)

.....
-----------------

instead of :
-----------------
.....
at Xyz.bar(Xyz.aj:123)
.....
-----------------

I guess when it comes to stacktrace reverse translation this whole
bytecode weaving opens not just one but several cans of worms...

Michael
Previous Topic:file not found in JUnit failure trace
Next Topic:Eclipse's refactoring does not cover aspectj files
Goto Forum:
  


Current Time: Sat Apr 20 00:11:44 GMT 2024

Powered by FUDForum. Page generated in 0.02800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top