ClassFile API `ClassModel::verify` accepts `ClassHierarchyResolver` as an optional argument and does not respect `ClassFile.ClassHierarchyResolverOption` of the actual context. Parsing, building and transforming take options from the actual `ClassFile` context and verification should follow the same API pattern.
This patch removes `ClassModel::verify` methods and introduces new top level methods: List<VerifyError> ClassFile::verify(ClassModel model); List<VerifyError> ClassFile::verify(byte[] bytes); List<VerifyError> ClassFile::verify(Path path); ClassFile API has been recently opened as a preview feature, so this bug technically requires a CSR (temporary unable to create). Impact of the API change is none as the API has not been released yet. Please review. Thanks, Adam ------------- Commit messages: - tests fix - dependent code fix - implementation - 8321248: ClassFile API ClassModel::verify is inconsistent with the rest of the API Changes: https://git.openjdk.org/jdk/pull/16947/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16947&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8321248 Stats: 122 lines in 11 files changed: 44 ins; 62 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/16947.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16947/head:pull/16947 PR: https://git.openjdk.org/jdk/pull/16947