Skip to content

Commit 8223d2c

Browse files
committed
fix: address sonar
1 parent ffdf419 commit 8223d2c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/ai/timefold/solver/core/impl/heuristic/selector/move/generic/PillarSwapMoveSelectorFactory.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ protected MoveSelector<Solution_> buildBaseMoveSelector(HeuristicConfigPolicy<So
4242
.map(GenuineVariableDescriptor::getVariableName)
4343
.toList();
4444
}
45-
var rightPillarSelectorConfig =
46-
Objects.requireNonNullElse(config.getSecondaryPillarSelectorConfig(), leftPillarSelectorConfig);
45+
var rightPillarSelectorConfig = config.getSecondaryPillarSelectorConfig();
46+
if (rightPillarSelectorConfig == null) {
47+
rightPillarSelectorConfig = leftPillarSelectorConfig;
48+
}
4749
EntityDescriptor<Solution_> rightEntityDescriptor = null;
4850
var rightEntitySelectorConfig = rightPillarSelectorConfig.getEntitySelectorConfig();
4951
if (rightEntitySelectorConfig != null && rightEntitySelectorConfig.getEntityClass() != null) {

0 commit comments

Comments
 (0)