On Thu, 16 Feb 2023 10:48:49 GMT, Adam Sotona <asot...@openjdk.org> wrote:
>> The main difference is that if the given entry is not directly applicable >> (when it comes from 3rd constant pool or when the pool is not shared during >> transformation) - a new or matching entry to the target pool is returned. >> This is not a builder pattern, this is projection of an entry to the target >> CP and it also prevents duplicates. > > `maybeClone` is not the main avenue, it is rather a helper method and I'll > look at details if it is necessary too expose it. `ConstantPoolBuilder::maybeClone` and `PoolEntry::clone` have been pulled from API to implementation ------------- PR: https://git.openjdk.org/jdk/pull/10982