forked from TimefoldAI/timefold-solver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow @PlanningId to be defined on interfaces (TimefoldAI#1060)
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.
- Loading branch information
1 parent
274dadd
commit 96c3da0
Showing
4 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...i/timefold/solver/core/impl/testdata/domain/interface_domain/TestdataInterfaceEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters