On Tue, 11 Feb 2025 02:26:57 GMT, Chen Liang <li...@openjdk.org> wrote:
> The ClassFile API promotes usage of constant nominal descriptors over literal > strings. However, for `class` file parsing, currently the efficient way to > check if a constant pool entry matches a desired descriptor is via unrolling > them back to strings. However, string unrolling is ugly, and often times > confusing, such as internal names versus field descriptors. > > As a result, I propose to provide new methods that compare constant pool > entries with the potential symbolic descriptors they represent. This is no > less efficient as checking raw string equality, avoids exceptional failure > behaviors of conversion to symbolic descriptors, and avoids potential > programmer errors stemming from raw string handling. See the CSR for a full > story. Keep alive; no one is responding on the classfile-api-dev list... ------------- PR Comment: https://git.openjdk.org/jdk/pull/23548#issuecomment-2715401502