RFR: 8255757: Javac emits duplicate pool entries on array::clone [v4]
Jonathan Gibbons
jjg at openjdk.java.net
Fri Jan 1 02:24:56 UTC 2021
On Thu, 31 Dec 2020 16:50:22 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:
>> Hi all,
>>
>> Currently, javac would emit duplicate pool entries when compiling array::clone.
>> This patch fixes it by using a cached field `Map<Type, Symbol> qualifiedSymbolCache;` and adds a corresponding test case.
>>
>> Thank you for taking the time to review.
>>
>> Best Regards.
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix copyright. Adjust import statements.
test/langtools/tools/javac/classfiles/T8255757/T8255757.java line 99:
> 97: }
> 98: if (num != 1) {
> 99: throw new AssertionError("The number of the pool entries on array::clone is not right.");
In any messages like this, in any test, it is good practice to display the expected value and the actual value. Tests are often/typically run in batch jobs on remote servers, and it can sometimes be difficult to recreate a failure, so always look to give as much helpful info as possible when any failure is detected.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1912
More information about the compiler-dev
mailing list