У меня есть следующее:
@CustomShadowVariable(variableListenerRef = @PlanningVariableReference(variableName = "..."))
@Override
public boolean isXyz() {
return xyz;
}
Тогда я получаю следующее:
java.lang.IllegalStateException: The entityClass (class ...) has a PlanningVariable annotated member (bean property ... on class ...) that returns a primitive type (boolean). This means it cannot represent an uninitialized variable as null and the Construction Heuristics think it's already initialized.
Maybe let the member (...) return its primitive wrapper type instead.
... видите, я действительно изменил бы boolean
на Boolean
, но тогдаЯ получу следующее:
java.lang.IllegalStateException: The getterMethod (public java.lang.Boolean isXyz()) with a CustomShadowVariable annotation must have a primitive boolean return type (class java.lang.Boolean) or use another prefix in its methodName (isXyz).
Кажется, что Construction Heuristics хочет иметь обнуляемый тип, чтобы он мог иметь нулевое значение инициализации, но при наличии логического объекта утверждение хелпера отражения пытается проверитьэто против примитивного типа, который терпит неудачу.
Это дефект?