David Jakes [
http://community.jboss.org/people/chicken_bones] created the discussion
"Method Content Comparison"
To view the discussion, visit:
http://community.jboss.org/message/641879#641879
--------------------------------------------------------------
I am trying to make a compatibility class loader.
General scenario. People edit the source file, change the contents of a few methods and
add a few fields and then recompile the class.
I then compare the original class and the changed class with javassist.
I need to detect when the methods haven't been changed. I tried measuring the length
of the code attribute but that fails when the change is a single field access redirection
for example. I also tried comparing the contents of the arrays but that didn't work as
various bytes at seemingly coordinated locations in the attribute have different values.
Due to the fact I don't actually understand how to read the bytecode I'm unable to
work out a solution.
If someone could help point me in the right direction or give me a sample of code that
could analyse this for me that would be great.
Thankyou for your time.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/641879#641879]
Start a new discussion in Javassist at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]