public float aggregate(float[] values, float nodata)
{
Float max = -Float.MAX_VALUE;
for (int i=0; i<values.length; i++)
{
<BUG>if (Float.compare(values[i], nodata) != 0)
max = Math.max(max, values[i]);
}</BUG>
return (max == -Float.MAX_VALUE) ? nodata : max;
}

public float aggregate(float[] values, float nodata)
{
Float max = -Float.MAX_VALUE;
for (int i=0; i<values.length; i++)
{
if (FloatUtils.isNotNodata(values[i], nodata))
{
max = Math.max(max, values[i]);
}
}
return (max == -Float.MAX_VALUE) ? nodata : max;
}
