parser seems to fail on weird nullable annotations #219
Open
Description
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
Metadata
Assignees
Labels
No labels