Source:
<code>private void processMovable(DescriptorPolicy descriptorPolicy, PlanningEntity entityAnnotation) { Class<? extends SelectionFilter> movableEntitySelectionFilterClass = entityAnnotation.movableEntitySelectionFilter(); boolean hasSelectionFilter = movableEntitySelectionFilterClass != PlanningEntity.NullMovableEntitySelectionFilter.class; Class<? extends PinningFilter> pinningFilterClass = entityAnnotation.pinningFilter(); boolean hasPinningFilter = pinningFilterClass != PlanningEntity.NullPinningFilter.class; if (hasPinningFilter && hasSelectionFilter) { throw new IllegalStateException("The entityClass (" + entityClass + ") uses both movableEntitySelectionFilter (" + movableEntitySelectionFilterClass + ") and pinningFilter (" + pinningFilterClass + "). " + <START> "Use pinningFilter exclusively."); <END> } if (hasPinningFilter) { declaredMovableEntitySelectionFilter = new SelectionFilter() { private final PinningFilter pinningFilter = ConfigUtils.newInstance(this, "pinningFilterClass", pinningFilterClass); @Override public boolean accept(ScoreDirector scoreDirector, Object selection) { return pinningFilter.accept(scoreDirector.getWorkingSolution(), selection); } }; } else if (hasSelectionFilter) { declaredMovableEntitySelectionFilter = ConfigUtils.newInstance(this, "movableEntitySelectionFilterClass", movableEntitySelectionFilterClass); } }</code><technical_language>error messages typically 2 lines: - line 1: is wrong. This is truth. fix though. Ends "\n" - line 2 (optional): fix it. This fix it, is a recommendation. Therefore, starts "Maybe ..." add a breadcrumb @PlanningEntity => throw new IllegalStateException("The entityClass (" + entityClass + ") movableEntitySelectionFilter (" + movableEntitySelectionFilterClass + ") pinningFilter (" + pinningFilterClass + ").\n" + "Maybe pinningFilterClass @" + PlanningEntity.class.getSimpleName() + " annotation.");</technical_language>

Target:
private void processMovable(DescriptorPolicy descriptorPolicy, PlanningEntity entityAnnotation) { Class<? extends SelectionFilter> movableEntitySelectionFilterClass = entityAnnotation.movableEntitySelectionFilter(); boolean hasSelectionFilter = movableEntitySelectionFilterClass != PlanningEntity.NullMovableEntitySelectionFilter.class; Class<? extends PinningFilter> pinningFilterClass = entityAnnotation.pinningFilter(); boolean hasPinningFilter = pinningFilterClass != PlanningEntity.NullPinningFilter.class; if (hasPinningFilter && hasSelectionFilter) { throw new IllegalStateException("The entityClass (" + entityClass + ") uses both movableEntitySelectionFilter (" + movableEntitySelectionFilterClass + ") and pinningFilter (" + pinningFilterClass + ").\n" + "Maybe use only pinningFilterClass on your @" + PlanningEntity.class.getSimpleName() + " annotation."); } if (hasPinningFilter) { declaredMovableEntitySelectionFilter = new SelectionFilter() { private final PinningFilter pinningFilter = ConfigUtils.newInstance(this, "pinningFilterClass", pinningFilterClass); @Override public boolean accept(ScoreDirector scoreDirector, Object selection) { return !pinningFilter.accept(scoreDirector.getWorkingSolution(), selection); } }; } else if (hasSelectionFilter) { declaredMovableEntitySelectionFilter = ConfigUtils.newInstance(this, "movableEntitySelectionFilterClass", movableEntitySelectionFilterClass); } }