Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser seems to fail on weird nullable annotations #219

Open
loosebazooka opened this issue Jul 10, 2024 · 0 comments
Open

parser seems to fail on weird nullable annotations #219

loosebazooka opened this issue Jul 10, 2024 · 0 comments

Comments

@loosebazooka
Copy link

loosebazooka commented Jul 10, 2024

A small bit of valid java code seems to be throwing an exception

private byte @Nullable [] bytes;

throws an error like

com.thoughtworks.qdox.parser.ParseException: syntax error @[123,16] in file:/abc/File.java

very simple reproducer

package org.example;

import com.thoughtworks.qdox.JavaProjectBuilder;
import java.io.StringReader;

public class Main {

    public static void main(String[] args) {
        var x = new JavaProjectBuilder();
        x.addSource(new StringReader(
            "package org.example;\n"
                + "public class Test {\n"
                + "  public byte @Nullable [] bytes;\n"
                + "}"));
    }
}

    
Exception in thread "main" com.thoughtworks.qdox.parser.ParseException: syntax error @[3,15]

some sort of reference: https://youtrack.jetbrains.com/issue/IDEA-265381/Primitive-type-members-cannot-be-annotated-for-a-primitive-array-field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant