-
Bug
-
Resolution: Done
-
Major
-
7.32.0.Final
-
None
-
NEW
-
NEW
I am getting following error when using kotlin data classes as PlanningEntity having a PlanningVariable with valueRangeProviderRefs to a collection of kotlin data classes. Following is the stacktrace of the error. I was able to reproduce this issue on master branch of optaplanner.
java.lang.IllegalArgumentException: The entityClass (class org.divy.resource.planning.domain.allocation.IterationAllocation) has a PlanningVariable annotated property (employee) that refers to a ValueRangeProvider annotated member (field private java.util.List org.divy.resource.planning.domain.iteration.IterationAllocations.employeeList) that returns a parameterized Collection with an unsupported type arguments (? extends org.divy.resource.planning.domain.employee.Employee).
at org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor.processValueRangeProviderAnnotation(AbstractFromPropertyValueRangeDescriptor.java:117) at org.optaplanner.core.impl.domain.valuerange.descriptor.AbstractFromPropertyValueRangeDescriptor.<init>(AbstractFromPropertyValueRangeDescriptor.java:57) at org.optaplanner.core.impl.domain.valuerange.descriptor.FromSolutionPropertyValueRangeDescriptor.<init>(FromSolutionPropertyValueRangeDescriptor.java:34) at org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor.buildValueRangeDescriptor(GenuineVariableDescriptor.java:152) at org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor.processValueRangeRefs(GenuineVariableDescriptor.java:139) at org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor.processPropertyAnnotations(GenuineVariableDescriptor.java:84) at org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor.processAnnotations(GenuineVariableDescriptor.java:77)