Configuration method name does not match function
songruikang opened this issue · 0 comments
songruikang commented
Hi team,
look at this method
Its function name is to add evaluationListener, but actually set it's evaluationListener collection.
And there is already an setEvaluationListeners method here.
may addEvaluationListeners should be change to
public Configuration addEvaluationListeners(EvaluationListener... evaluationListener){
Set<EvaluationListener> listenerSet = new HashSet<EvaluationListener>();
listenerSet.addAll(this.evaluationListeners);
listenerSet.addAll(asList(evaluationListener));
return Configuration.builder().jsonProvider(jsonProvider).mappingProvider(mappingProvider).options(options).evaluationListener(listenerSet).build();
}
This modification seems to better match the function name as well as the code design