JDK-8281674 : tools/javac/annotations/typeAnnotations/classfile/AnonymousExtendsTest.java fails with AssertionError
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 19
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-02-12
  • Updated: 2024-03-20
  • Resolved: 2022-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b10Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK19 CI:

tools/javac/annotations/typeAnnotations/classfile/AnonymousExtendsTest.java

Here's a snippet from the log file:

#section:main
----------messages:(5/152)----------
command: main AnonymousExtendsTest
reason: User specified action: run main AnonymousExtendsTest 
Mode: agentvm
Agent id: 9
elapsed time (seconds): 0.07
----------configuration:(14/1689)----------
Boot Layer
  class path: /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/javatest.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jtreg.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/junit.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/hamcrest.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/testng.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jcommander.jar 
              /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/guice.jar 
  patch:      java.base /opt/mach5/mesos/work_dir/slaves/c82600aa-2448-475c-8c08-6f02a5b3f3af-S23039/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/12145499-bb9e-4656-907b-7ca94ddd4441/runs/fb1fa7eb-b3d6-47b1-abb2-1e6ae736e8f1/testoutput/test-support/jtreg_open_test_langtools_tier1/patches/java.base

Test Layer
  class path: /opt/mach5/mesos/work_dir/slaves/c82600aa-2448-475c-8c08-6f02a5b3f3af-S23039/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/12145499-bb9e-4656-907b-7ca94ddd4441/runs/fb1fa7eb-b3d6-47b1-abb2-1e6ae736e8f1/testoutput/test-support/jtreg_open_test_langtools_tier1/classes/5/tools/javac/annotations/typeAnnotations/classfile/AnonymousExtendsTest.d
              /opt/mach5/mesos/work_dir/jib-master/install/jdk-19+10-542/src.full/open/test/langtools/tools/javac/annotations/typeAnnotations/classfile

----------rerun:(28/4831)*----------

<snip>

----------System.err:(12/726)----------
java.lang.AssertionError: Unexpected annotations[@AnonymousExtendsTest.TA(1)],[@AnonymousExtendsTest.TA(2)]
	at AnonymousExtendsTest.checkAnnotations(AnonymousExtendsTest.java:71)
	at AnonymousExtendsTest.testIt(AnonymousExtendsTest.java:54)
	at AnonymousExtendsTest.main(AnonymousExtendsTest.java:75)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:828)

JavaTest Message: Test threw exception: java.lang.AssertionError
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Unexpected annotations[@AnonymousExtendsTest.TA(1)],[@AnonymousExtendsTest.TA(2)]

Comments
Changeset: 6fdfe045 Author: Joe Darcy <darcy@openjdk.org> Date: 2022-02-12 01:33:41 +0000 URL: https://git.openjdk.java.net/jdk/commit/6fdfe0458df989a7946b4f52a3023e8a39fb3bbb
12-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7450 Date: 2022-02-12 01:23:37 +0000
12-02-2022

The only changeset in the jdk-19+10-542-tier1 build ID is: JDK-8281462 Annotation toString output for enum not reusable for source input so I have pinged [~darcy] on Slack...
12-02-2022