Re: Problems with too large methods

[email protected]
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <2117274537.13079061316251583269.JavaMail.root@zimbra7-e1.priv.proxad.net>
Nikita Salnikov-Tarnovski wrote:
> On some occasion, when original method is big enough, my modified code
> becomes too large and executing it I get
> Exception in thread "main" java.lang.ClassFormatError: Invalid method
> Code length 65554 in class file

> Why CheckClassAdapter does not detect this violation ?

checking this exactly would require duplicating much of the code in ClassWriter. Instead, you can use commons.CodeSizeEvaluator to get lower and upper bounds on the final code size (e.g. you can easily write a subclass that throws an error if the lower - or upper - bound becomes too large).

Eric
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.