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

Bug 501652 - [1.8][impl] inconsistent call to ITypeAnnotationWalker.toSupertype(..) #325

Merged
merged 1 commit into from Sep 8, 2022

Conversation

stephan-herrmann
Copy link
Contributor

@stephan-herrmann stephan-herrmann commented Aug 18, 2022

From https://bugs.eclipse.org/501652

What it does

Pass the correct type name (super interface not super class)

How to test

Actually this cannot be tested, because

  • "normal" type annotation walkers rely only on the short index argument
  • only DispatchingAnnotationWalker uses the char[] superTypeSignature signature to weave in information from eea
    • eea - being specialized for null annotations - use super type information only for type arguments, since it doesn't make sense to say implements @Nullable IFoo.
    • since the super type must have type arguments for eea to make sense here,BTB.cachePartsFrom() will find non-null binaryType.getGenericSignature()
  • To challenge the wrongly passed type name, these two would have to coincide which cannot happen at the same time:
    • the super type must be generic to host type argument annotations in eea
    • the super type must be non-generic for BTB.cachePartsFrom() to enter the code branch in question.

Still, cleaning up the code makes sense simply to avoid future confusion :)

ITypeAnnotationWalker.toSupertype(..)
@stephan-herrmann stephan-herrmann self-assigned this Aug 18, 2022
@stephan-herrmann stephan-herrmann merged commit 450b5c6 into eclipse-jdt:master Sep 8, 2022
2 of 3 checks passed
@stephan-herrmann stephan-herrmann deleted the Bug_501652 branch September 8, 2022 12:42
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this pull request Sep 9, 2022
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.core that referenced this pull request Sep 9, 2022
iloveeclipse added a commit that referenced this pull request Sep 9, 2022
jarthana pushed a commit to jarthana/eclipse.jdt.core that referenced this pull request Sep 21, 2022
…oSupertype(..) (eclipse-jdt#325)

Pass the correct type name (super interface not super class)
jarthana pushed a commit to jarthana/eclipse.jdt.core that referenced this pull request Sep 21, 2022
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 this pull request may close these issues.

None yet

1 participant