My Oracle Support Banner

Javac Triggers an Assertion in DeferredAttr.java (Doc ID 2637618.1)

Last updated on APRIL 13, 2023

Applies to:

Java SE JDK and JRE - Version 11 to 11
Information in this document applies to any platform.

Symptoms

On version 11.0.6 of the Java Development Kit (JDK), when the Java SE compiler is run on certain kinds of Java code, an assertion is triggered in DeferredAttr.java:172 and the compile fails.
The issue can be reproduced at will with the following steps:

  1. Create a directory/folder called 'jdk/javac/bug'
  2. Copy the supplied reproducer program 'JavacBug.java' to the 'bug' directory.
  3. Compile 'javac jdk\javac\bug\JavacBug.java'

 

Disclaimer

This sample code is provided for educational purposes only. It is not supported by Oracle Support. It has been tested internally, however we do not guarantee that it will work for you. Ensure that you run it in a safe test environment. Additionally, the code and object names used in this article represent fictitious sample names that make up an example. Any similarity to actual code is purely coincidental and not intended in any other manner.

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.