[
https://issues.apache.org/jira/browse/ARIES-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045164#comment-13045164
]
David Jencks commented on ARIES-669:
------------------------------------
Your comment doesn't make sense to me. How would you add an existing static
init method? Isn't it already there?
Having looked at the class file and jvm specs a little bit and guessed quite a
bit I think that:
each static code in the original source gets turned into a static_init_* method
of some kind
each class gets a <clinit> method that calls the static_init* methods in the
order they appear in the original source code. This is not supposed to be
marked synthetic.
I don't understand where the code from
static int foo = 1;
goes.
I think that you want aries to add another static_init_foo method to do
something, and at this point I think you agree that it should be marked
synthetic.
I don't understand what the asm StaticInitMerger does. From the name I would
guess that it combines all the static_init methods into one. I would expect
this to possibly cause initialization order problems in some cases, but
obviously I'm not an expert. In any case if it generates a new method that
should be marked synthetic. If it removes static_init methods I'd expect that
to cause problems in some circumstances.
I think what is least likely to cause problems would be if aries left the
existing static init methods alone, added a new one for its own purposes,
marked synthetic, and modified the <clinit> method to call the new static init
method either before or after all the existing static init methods, as
appropriate. I'd hope this wouldn't use the StaticInitMerger class so we
wouldn't need to modify or reimplement it.
I'm also not clear whether you want to reimplement the asm serialVersionUID
adder so you can have a clean-room one that marks the field synthetic. I
subclassed it and copied and modified the relevant method.
> Proxy or weaving code should mark all its changes synthetic
> -----------------------------------------------------------
>
> Key: ARIES-669
> URL: https://issues.apache.org/jira/browse/ARIES-669
> Project: Aries
> Issue Type: Bug
> Components: Proxy
> Affects Versions: 0.4
> Reporter: David Jencks
>
> In order to make it easier for OWB to ignore the additional goo added by the
> proxy/weaving stuff, it should all be marked synthetic. So far I've
> identified the added SerialVersionUID field and static_init_* methods as
> causing problems with the jcdi tck.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira