Hello to everyone. I am working on a bytecode analyzer, and in order to test it 
I fed it by a _jsp.class file generated by Apache Tomcat 10.0.2 from a trivial 
JSP page. I noticed that the code attribute of one of the methods in the class 
file (<clinit> to be precise) has an empty LocalVariableTable attribute, i.e., 
the attribute is present but has zero rows. This is, in a sense, coherent with 
the fact that the method has no local variable, but if we really want to be 
pedantic the classfile should be considered incorrect, because all the JVM 
specifications from v8 to v16 say that:

"There may be no more than one LocalVariableTable attribute per local variable 
in the attributes table of a Code attribute.” (sec. 4.7.13)

This means: no local variable, no LocalVariableTable attribute. Note however 
that the servlet works on my setup with AdoptOpenJDK 1.8.0_232.
I would like to investigate the issue better, and at the purpose I would like 
to ask where is the Tomcat code that is responsible for emitting the _jsp.class 
files.
Best,
Pietro Braione
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to