RFR: 8278863: Add method ClassDesc::ofInternalName [v5]

Adam Sotona asotona at openjdk.org
Tue Sep 6 12:26:02 UTC 2022


> The symbolic constants API (`java.lang.constant`) was designed, in part, to provide bytecode parsing and generation APIs with a validated, common, symbolic form for constants in Java class files. 
> 
> There is an easy way to create a `ClassDesc` from a binary name (`ClassDesc::of`) or a field descriptor (`ClassDesc::ofDescriptor`) but not from an internal name. But, the internal name is common in low-level bytecode-manipulation code. 
> 
> This patch adds `ClassDesc::ofInternalName` static factory method that creates a `ClassDesc` from class internal name.
> Class internal name validation and extended ClassDescTest are also parts of this patch.
> 
> CSR is linked with the issue.
> 
> Please review.
> 
> Thank you,
> Adam

Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Merge branch 'openjdk:master' into JDK-8278863
 - extended ClassDescTest
 - updated ClassDesc::ofInternal javadoc with JVMS link and fixed indentation
 - Update test/jdk/java/lang/constant/ClassDescTest.java
   
   Co-authored-by: Jorn Vernee <JornVernee at users.noreply.github.com>
 - 8278863: Add method ClassDesc::ofInternalName

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/9201/files
  - new: https://git.openjdk.org/jdk/pull/9201/files/f422b655..b25351c1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9201&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9201&range=03-04

  Stats: 276762 lines in 4815 files changed: 142585 ins; 90657 del; 43520 mod
  Patch: https://git.openjdk.org/jdk/pull/9201.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9201/head:pull/9201

PR: https://git.openjdk.org/jdk/pull/9201


More information about the core-libs-dev mailing list