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

Support eea for @Owning / @NotOwning #2258

Open
stephan-herrmann opened this issue Mar 31, 2024 · 0 comments · May be fixed by #2461
Open

Support eea for @Owning / @NotOwning #2258

stephan-herrmann opened this issue Mar 31, 2024 · 0 comments · May be fixed by #2461
Assignees
Milestone

Comments

@stephan-herrmann
Copy link
Contributor

Follow-up from #1716: it should be possible to externally add libraries with @Owning / @NotOwning in suitable locations.

I will try to blend this into the existing support for .eea files.

eea for null analysis uses this encoding:

  • 0 = @Nullable
  • 1 = @NonNull

Without modifying the general format, we still have the digits 2-9 for encoding more annotations. While there is no intuitive mapping like 0/1, I think using 8/9 is a pragmatically valid option, that still leaves us with the option to use 2 for another null related annotation etc. (Should we ever run out of digits, we can still change the format to let digits start a multi char encoding etc. - but not for now).

Technically we need to check if the existing integration via TypeAnnotationWalker can suitably "simulate" owning annotations in declaration positions. Let's see whether having @Owning specify TYPE_USE as one of its targets works for or against this strategy.

@stephan-herrmann stephan-herrmann self-assigned this Mar 31, 2024
stephan-herrmann added a commit to stephan-herrmann/eclipse.jdt.core that referenced this issue May 20, 2024
fixes eclipse-jdt#2258

Implement minimal tests borrowing infra from existing ones
+ add AutoCloseable to jclMin21.jar

Feed eea into tagBits of method, parameter, field

Update analysis to consider assignment to @owning field of other class
@stephan-herrmann stephan-herrmann linked a pull request May 20, 2024 that will close this issue
@stephan-herrmann stephan-herrmann added this to the MilestoneNxt milestone Aug 17, 2024
@mpalat mpalat modified the milestones: MilestoneNxt, 4.34 Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants