commons-math icon indicating copy to clipboard operation
commons-math copied to clipboard

Set to default strategies if null is given

Open pingpingy1 opened this issue 4 months ago • 1 comments

In the current implementation, it is possible to set the nanStrategy and tiesStrategy of NaturalRanking to null, even though they will inevitably throw NPEs upon any calls to rank or resolveTie. This commit modifies the constructor such that if null is given to either of the strategies, then they are set to the default strategies.

pingpingy1 avatar Feb 22 '24 06:02 pingpingy1