Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

locally-defined annotations represented incorrectly in extracted JAIFs #119

@dbrosoft

Description

@dbrosoft
class C {
    @java.lang.annotation.Target(java.lang.annotation.ElementType.CONSTRUCTOR)
    @interface A {}

    @A
    C() { throw new RuntimeException(); }
}

Save the code above as C.java; compile and extract annotations.

$ javac -g C.java
$ extract-annotations C.class

If the result, given below, is successfully inserted into a source file, it will generate a syntax error due to the use of @C$A in place of the expected @A.

package :
annotation @C$A: @java.lang.annotation.Target(value={CONSTRUCTOR})

package :
class C:

    method <init>()V: @C$A
        return:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions