Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Modified classes of the Jar files in Inpath (which shouldn't be modified)

If you are able to include a snippet of code that always helps makes
the situation easier for us to understand.  What is the name of the
'side effect file'?  If AspectJ is unable to implement inlining for
around advice, you will get closure classes generated during weaving.
You say you used javap to compare the two files - did you compare
every part of them, not just the method contents but everything - was
there a large attribute in the larger of the two?  Did you use
'-private' when you ran javap?

As I say - a bit of code that demonstrates what you are seeing would
help immensely.  I cannot recreate this without more info.  Have you
tried performing your compilation step outside of AJDT, does it behave
in the same unusual way on the command line?


On 27/02/07, bora.erbas <bora.erbas@xxxxxxxxx> wrote:

Hi all,

This problem seems to be most interesting one I ever had with AspectJ. It
has multiple sub-problems some of which may not directly be related to
AspectJ.

Firstly, what I am doing is to modify some of the classes in a 3rd party
framework using AspectJ. I am using Eclipse AspectJ plugin and so on. So I
add the 3rd party library in the Inpath of AspectJ and apply my advices, and
some of the classes from the framework get modified by AspectJ. This is the
main work flow. By the way, as a side question I'd like to ask this: AspectJ
extracts _all_ the class files from the 3rd party Jar file into the bin
directory, even if 99% percent of them never gets modified. I think this is
the expected behaviour, but is it possible to have AspectJ extract only
those files which gets indeed advised/modified?

And now the problem. I have a few aspects and due to the current
requirements each of them only affects one class from the framework; hence
no wildcards, just one method replaced with an around advice for example.
Hence I expect that only those class files which are advised should be
modified by AspectJ (correct?). This is true except for only 1 case and I
have been struggling to solve this issue. I compare the files and for one
aspect there is a side effect; one more modified class file.
And then it gets really more interesting; I decompile the "side-effect"
class file and the original class file from the library using Jad and
compare them. Guess what, they are the same!!! Then I use javap to
disassemble these two class files and again the same. However, one of the
files is 15kB and the other is 10kB, which means there is definitely a
difference right? So what could be the difference?

Any ideas on how to solve this puzzle?

Cheers.

--
View this message in context: http://www.nabble.com/Modified-classes-of-the-Jar-files-in-Inpath-%28which-shouldn%27t-be-modified%29-tf3299223.html#a9177518
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top