Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Java nullable annotation doesn't compile when applied to fully qualified names #397

Open
msjarrett opened this issue Aug 14, 2018 · 0 comments
Labels

Comments

@msjarrett
Copy link
Contributor

--java-nullable-annotation org.checkerframework.checker.nullness.qual.Nullable

If an interface uses a type from a different Java package (using @extern foo.yaml), the output will be @annotation fully.qualified.ClassName, which causes Java compilation problems.

For example:
public abstract io.grpc.Status send(Id recipient, @nullable com.google.package.Message message);

Results in:
error: scoping construct cannot be annotated with type-use annotation: @org.checkerframework.checker.nullness.qual.Nullable

Not a Java expert, but I think the correct way to apply the annotation is:
com.google.package.@nullable Message

@artwyman artwyman added the bug label Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants