-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AutoValue null annotations in Eclipse #1634
Comments
Hi Frank! You brought up many of the same issues in #977. Some things have changed since then, but some haven't. One thing I notice that hasn't changed is the Eclipse bug where it synthesizes a One thing that has changed is that we attempt to discover if there is a
Then AutoValue will discover and use that We could indeed copy every property field into a local variable, or perhaps just every field for a property that is neither primitive nor Doing this would close off another path, of tracking all non- The other main issue concerns I believe you're also saying that the Eclipse compiler issues a warning if you use So, to summarize:
|
(@eamonnmcmanus , I'm giving this a priority to satisfy our triage process, but please adjust as appropriate.) |
Hi,
in Eclipse there is a setting to ignore optional compile errors, that can be configured for the generated sources.
In my projects those are always on, because AutoValue generates problems.
What cause the problems:
See the attached example...
AutoValueNNBD.zip
In this minimal example class, the generated code has 4 errors and 5 warnings.
In Eclipse (JDT) there are 3 null annotations:
@NonNull
,@Nullable
and@NonNullByDefault
The
@NonNullByDefault
can be put onto field/method/class or event the package. Like in this example I have put it into the package-info.java.In the example, I created a
AutoValue_KeyValueProposal.java
, to illustrate how it should look like from my POV to make it compile error free.@Nullable
@NonNull
ever if the@NonNullByDefault
is activeregards
Frank
The text was updated successfully, but these errors were encountered: