-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
NEW
-
NEW
If you put a @ShadowVariable annotation on a field (instead of a getter) and run it with quarkus, OptaPlanner-quarkus throws a IllegalStateException. None of the other annotations (@PlanningVariable, @PlanningPin, @InverseRelationShadowVariable, etc) suffer from this problem, nor does @PlanningVariable itself.
Solution suggestion A
Custom shadow variables need to access the source variable too. If the annotation is on a field, then the source variable should be regarded as a field too. If the @ShadowVariable annotation is on a getter, then the source variable should be regarded as a getter.
If the source variable is regarded as a field, gizmo can generate a virtual getter, like it does for planning variables and the destination shadow variable already.