Use method reference (suggested by "sonarcloud").
@@ -108,7 +108,7 @@ public class SimplexOptimizer extends MultivariateOptimizer {
// Indirect call to "computeObjectiveValue" in order to update the
// evaluations counter.
- final MultivariateFunction evalFunc = p -> computeObjectiveValue(p);
+ final MultivariateFunction evalFunc = this::computeObjectiveValue;
final boolean isMinim = getGoalType() == GoalType.MINIMIZE;
final Comparator<PointValuePair> comparator = (o1, o2) -> {
