-
Notifications
You must be signed in to change notification settings - Fork 111
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 576983 - fix ClassCastException for Types#asMemberOf of a Record #199
Conversation
…omponent. Bug 576983 - fix ClassCastException for Types#asMemberOf of a RecordComponent. Cast to VariableBinding instead. Signed-off-by: Raoul de Haard <raouldehaard@gmail.com>
I am the project lead of MapStruct. We have received multiple different bug reports about certain problems around this problem in our project. Is it possible for someone from the JDT team to look into this PR? It would be very appreciated. cc: @jarthana, @mpalat, @iloveeclipse |
good point @iloveeclipse. @raouldh can you look into adding a test case that would fail without your fix? |
I've added a test case, because I need this fix as well ... 😉 |
Can anyone review or merge my patch? |
The patch looks good to me. But looks the like the testcase commit is not in the same branch and hence can't squash/merge. Can you take care of that please? |
The fix with the test is on a different pull request, as I - of course - couldn't modify someone else branch: #321 |
Bug 576983 - fix ClassCastException for Types#asMemberOf of a RecordComponent. Cast to VariableBinding instead.
A ClassCastException occurs when binding a member of a Java Record component to a FieldBinding, cast to supertype of FieldBinding instead(VariableBinding). See bugreport.
With this patch applied to my Eclipse installation I can now open all my Java Record classes without the ClassCastException.