Giter Site home page Giter Site logo

Comments (5)

msridhar avatar msridhar commented on May 18, 2024

We can easily support interpreting the CF annotations as best as possible within the (less sophisticated) NullAway type system. Actually enhancing the power of the type system would be more work and would require some further justification in terms of additional reliability in practice, etc.

For this one, I think by default we would just treat the field as @NonNull. Are you looking for deeper support than that?

from nullaway.

msridhar avatar msridhar commented on May 18, 2024

Ah, I see. You're probably looking to not see reports of initialization errors on such fields, yes? If so, that can easily be handled using the -XepOpt:NullAway:ExcludedFieldAnnotations option (see here).

from nullaway.

chengniansun avatar chengniansun commented on May 18, 2024

For this one, should we treat it in the following way,

If a field $f$ annotated with @monotonicnonnulldecl is not initialized in a constructor, NullAway does not emit a warning saying that " initializer method does not guarantee @nonnull fields f is initialized along all control-flow paths"

I am currently focusing on eliminating all warnings on uninitialized fields.

from nullaway.

msridhar avatar msridhar commented on May 18, 2024

Yeah, for now you can handle this by passing -XepOpt:NullAway:ExcludedFieldAnnotations=MonotonicNonNullDecl as an Error Prone / javac argument. For CF compatibility we should probably bake in support for this annotation.

from nullaway.

chengniansun avatar chengniansun commented on May 18, 2024

Neat. Thank you.

from nullaway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.