I have a problem with Javassist. When I try to edit a (relatively) big class file (38KB), Javassist will truncate it. It is the biggest class file I have tried editing, so I am asuming it has something to do with the size. Smaller class files have no problem.
The code I am running is this simple:
import javassist.*; public class Test{ public static void main(String[] args) throws Exception{ ClassPool pool = ClassPool.getDefault(); CtClass c = pool.get("com.ehsunbehravesh.mypasswords.gui.MainFrame"); c.writeFile(); } }
And this is the result I get:
digles@XXXX:~/mypassbin/MyPasswords$ ls -l com/ehsunbehravesh/mypasswords/gui/MainFrame.class -rw-r--r-- 1 digles XXXX 38201 ene 31 13:53 com/ehsunbehravesh/mypasswords/gui/MainFrame.class digles@XXXX:~/mypassbin/MyPasswords$ java Test digles@XXXX:~/mypassbin/MyPasswords$ ls -l com/ehsunbehravesh/mypasswords/gui/MainFrame.class -rw-r--r-- 1 digles XXXX 16384 mar 21 11:09 com/ehsunbehravesh/mypasswords/gui/MainFrame.class
Can anybody help me with this? Thanks in advance.
Just in case, I am using javassist-3.14.0-GA.