[jboss-user] [Javassist user questions] - Find and replace synchronized blocks with JA 3.4?

PaulKeeble do-not-reply at jboss.com
Wed Dec 19 21:58:53 EST 2007


I have been using the ExprEditor class along with #instrument to enhance byte code, but I am having a little trouble with detecting synchronised blocks. What I want to do is put a method call in place of the beginning and replace the end of the block with a different method call and remove the synchronisation entirely. Sounds a little crazy I know, but its all for a good purpose.

Unfortunately I can't seem to work out from the tutorials how to go about changing the synchronised blocks and ExprEditor has no method for finding them. Any points on how to detected and replace would be much appreciated.

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114493#4114493

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114493



More information about the jboss-user mailing list