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

patch for "AutoValue should respect @Nullable annotations on types #283" #293

Closed
wants to merge 1 commit into from

Commits on Dec 3, 2015

  1. Support for TYPE_USE @nullable.

    Limitations: The following cases currently don't work with javac (i.e.
    the annotation processors don't see the @nullable so a null check is
    generated in the constructor):
    
    public abstract int @nullable [] getInts()
    This works with eclipse JDT and the null check is ommited in the
    generated code, but note that the @nullable is in the wrong position in
    the generated code (i.e. @nullable int[] instead of int @nullable[])),
    which might lead to compiler warnings
    
    For generic type T: 
    @nullable
    public abstract T getT()
    (works in JDT)
    
    Also @nullable won't work for types which can't be imported because of
    naming conflicts, because the @nullable is generated at the wrong place,
    i.e. "@nullable some.package.Map" instead of "some.package.@nullable
    Map" which won't compile at all for TYPE_USE @nullable.
    brychcy committed Dec 3, 2015
    Configuration menu
    Copy the full SHA
    336cbcb View commit details
    Browse the repository at this point in the history