Summary
Add javap
option to print potential verification errors.
Problem
It is not easy to identify potential class verification issues from javap
print. And it is mostly not feasible to load the class to verify it.
Solution
Add javap
an option to check the class and print obvious verification errors found.
Specification
diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties
index 2cab137cb6349..5a50662afa0b9 100644
--- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties
@@ -126,6 +126,9 @@ main.opt.sysinfo=\
\ -sysinfo Show system info (path, size, date, SHA-256 hash)\n\
\ of class being processed
+main.opt.verify=\
+\ -verify Print additional class verification info
+
main.opt.module=\
\ --module <module> -m <module> Specify module containing classes to be disassembled
diff --git a/src/jdk.jdeps/share/man/javap.1 b/src/jdk.jdeps/share/man/javap.1
index 68290d25bfb45..4e381a5b40e93 100644
--- a/src/jdk.jdeps/share/man/javap.1
+++ b/src/jdk.jdeps/share/man/javap.1
@@ -126,6 +126,9 @@ Prints internal type signatures.
Shows system information (path, size, date, SHA-256 hash) of the class
being processed.
.TP
+\f[V]-verify\f[R]
+Print additional class verification info.
+.TP
\f[V]-constants\f[R]
Shows \f[V]static final\f[R] constants.
.TP
- csr of
-
JDK-8182774 Verify code in javap
-
- Resolved
-