Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2, 3.0
-
None
-
None
-
None
Description
HarmonicCoefficientsGuesser.sortObservations()
generates an NPE warning from Eclipse which thinks that mI can be null in the while condition.
The code looks like:
WeightedObservedPoint mI = observations[i]; while ((i >= 0) && (curr.getX() < mI.getX())) { observations[i + 1] = mI; if (i-- != 0) { mI = observations[i]; } else { mI = null; } } // mI is not used further
It looks to me as though the "mI = null" statement is either redundant or wrong - why would one want to replace one of the observations with null during a sort?