Fix a small leak in constant pool merging during retransformation of a class. If this class has a catch block with `Throwable`, the class `Throwable` is pre-resolved in the constant pool, while all the other classes are in a unresolved state. So the constant pool merging process was considering the entry with pre-resolved class as different compared to the destination and create a new entry. We now try to consider it as equal specially for Methodref/Fieldref.
------------- Commit messages: - 8308762: Metaspace leak with Instrumentation.retransform Changes: https://git.openjdk.org/jdk/pull/14780/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14780&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8308762 Stats: 62 lines in 4 files changed: 29 ins; 31 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/14780.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14780/head:pull/14780 PR: https://git.openjdk.org/jdk/pull/14780