Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if a class file version 50.0 (Java 6) has been preverified?

I "upgraded" some jar files from class file version 49.0 to 50.0 with ProGuard.

Because preverification is optional with version 50.0, I wonder if there is a way to check if the class file has really an StackMapTable attribute in it.

(It's not that I don't trust ProGuard "[...] The following options upgrade class files to Java 6, by updating their internal version numbers and preverifying them." but I'd like to learn how to verify the existance of the StackMapTable.)

like image 212
soc Avatar asked May 28 '11 14:05

soc


1 Answers

Javaasist has support for reviewing stack map tables.

The one other nugget I came across was java -XX:-FailOverToOldVerifier -Xverify:all which should only verify if there is SMT information in a 50+ version class file. However, I haven't tried that and cant even tell you what it might look like on output.

like image 87
philwb Avatar answered Oct 20 '22 23:10

philwb