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

fix: allow @PlanningId to be defined on interfaces #1060

Merged

Conversation

Christopher-Chianelli
Copy link
Contributor

Previously, getAllMembers excluded members defined in interfaces. Presumably, this was because methods would have implementations in the implementing class.
However, there is a flaw in that logic: implementations of a method do not inherit the annotations of the declared method. As a result, when LookupManager looks up the accessor of a class whose @PlanningId is defined in an interface,
it finds none.

getAllMembers is changed to add all interface methods to the member list, thus allowing interface members to be used in lookups.

Previously, `getAllMembers` excluded members defined in interfaces.
Presumably, this was because methods would have implementations in the
implementing class.
However, there is a flaw in that logic: implementations of a method do
not inherit the annotations of the declared method.
As a result, when LookupManager looks up the accessor of a class
whose @PlanningId is defined in an interface,
it finds none.

`getAllMembers` is changed to add all interface methods to the member
list, thus allowing interface members to be used in lookups.
triceo
triceo previously approved these changes Aug 29, 2024
Copy link
Contributor

@triceo triceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with small comments.
An explanation of why this was necessary would be useful.

@triceo triceo added this to the v1.14.0 milestone Aug 29, 2024
Copy link

sonarcloud bot commented Aug 29, 2024

@triceo triceo assigned triceo and Christopher-Chianelli and unassigned triceo Aug 30, 2024
@triceo triceo added the bug Something isn't working label Aug 30, 2024
@triceo triceo merged commit 96c3da0 into TimefoldAI:main Aug 30, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants