dropbox / djinni

A tool for generating cross-language type declarations and interface bindings.
Apache License 2.0
2.88k stars 488 forks source link

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

Open msjarrett opened 5 years ago

msjarrett commented 5 years ago

--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