-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Fix superclass functional interface resolution in Painless #81698
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi @jdconrad, I've created a changelog YAML for you. |
Hi @jdconrad, I've updated the changelog YAML for you. |
Hi @jdconrad, I've updated the changelog YAML for you. |
@elasticmachine run elasticsearch-ci/docs-check |
@elasticmachine run elasticsearch-ci/part-1 |
@elasticmachine run elasticsearch-ci/part-1 |
@elasticmachine run elasticsearch-ci/docs-check |
Hi @jdconrad, I've updated the changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the following test?
public void testUnaryOperator() {
assertEquals("doremi", exec("List lst = ['abc', '123']; lst.replaceAll(f -> f.replace('abc', 'doremi')); lst.get(0);"));
assertEquals("doremi", exec("def lst = ['abc', '123']; lst.replaceAll(f -> f.replace('abc', 'doremi')); lst.get(0);"));
}
Can you thank @megglos and @TheFireCookie in the commit message?
We'll also have to write up a Known issues section in the 7.16 release notes
…1698) A recent change [1] to how we load our allow list changed the resolution for how Painless looks up methods of super classes. However, functional interface loading was not changed which caused a bug where a functional interface would not look at its super interfaces for the functional interface method [2]. This fixes the issue by going through each super interface until the functional interface method is found when the target interface doesn't have the functional interface method. [1] elastic#76955 [2] elastic#81696 Also a big thanks to @megglos and @TheFireCookie for their help with this issue.
…1698) A recent change [1] to how we load our allow list changed the resolution for how Painless looks up methods of super classes. However, functional interface loading was not changed which caused a bug where a functional interface would not look at its super interfaces for the functional interface method [2]. This fixes the issue by going through each super interface until the functional interface method is found when the target interface doesn't have the functional interface method. [1] elastic#76955 [2] elastic#81696 Also a big thanks to @megglos and @TheFireCookie for their help with this issue.
…81737) A recent change [1] to how we load our allow list changed the resolution for how Painless looks up methods of super classes. However, functional interface loading was not changed which caused a bug where a functional interface would not look at its super interfaces for the functional interface method [2]. This fixes the issue by going through each super interface until the functional interface method is found when the target interface doesn't have the functional interface method. [1] #76955 [2] #81696 Also a big thanks to @megglos and @TheFireCookie for their help with this issue.
…81738) A recent change [1] to how we load our allow list changed the resolution for how Painless looks up methods of super classes. However, functional interface loading was not changed which caused a bug where a functional interface would not look at its super interfaces for the functional interface method [2]. This fixes the issue by going through each super interface until the functional interface method is found when the target interface doesn't have the functional interface method. [1] #76955 [2] #81696 Also a big thanks to @megglos and @TheFireCookie for their help with this issue.
A recent change [1] to how we load our allow list changed the resolution for how Painless looks up methods of super classes. However, functional interface loading was not changed which caused a bug where a functional interface would not look at its super interfaces for the functional interface method [2].
This fixes the issue by going through each super interface until the functional interface method is found when the target interface doesn't have the functional interface method.
[1] #76955
[2] #81696