Skip to content

Syntax error on annotated type parameter #182

Open
@eskatos

Description

When parsing the following code:

public interface Example<T extends @Nullable Object> {}

or any annotated type parameter,
qdox 2.0.3 fails with:

Caused by: com.thoughtworks.qdox.parser.ParseException: syntax error @[26,42] in file:/path/to/Example.java
        at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:1963)
        at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:2085)
        at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:1944)
        at com.thoughtworks.qdox.library.SourceLibrary.parse(SourceLibrary.java:232)
        at com.thoughtworks.qdox.library.SourceLibrary.parse(SourceLibrary.java:209)
        at com.thoughtworks.qdox.library.SourceLibrary.addSource(SourceLibrary.java:159)

Context

Parsing Java code from the https://github.com/gradle/gradle codebase for its own build.

Two examples:

https://github.com/gradle/gradle/blob/13c9f3d7a3e7d7a6180fd6bd5c52f35c5d068680/subprojects/core-api/src/main/java/org/gradle/api/Transformer.java#L26

https://github.com/gradle/gradle/blob/13c9f3d7a3e7d7a6180fd6bd5c52f35c5d068680/subprojects/core-api/src/main/java/org/gradle/api/provider/Provider.java#L127

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions