Commit b9b52e9b authored by Matija Obreza's avatar Matija Obreza
Browse files

FIX: Fixed class cast exception in PDCI stats


Signed-off-by: Matija Obreza's avatarMatija Obreza <matija.obreza@croptrust.org>
parent 86982887
......@@ -1437,16 +1437,10 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
return null;
}
// Determining JPA data types
// System.err.println(overall[0].getClass());
// System.err.println(overall[1].getClass());
// System.err.println(overall[2].getClass());
// System.err.println(overall[3].getClass());
stats.setMin((Double) overall[0]);
stats.setMax((Double) overall[1]);
stats.setAvg((Double) overall[2]);
stats.setCount((Long) overall[3]);
stats.setMin((Number) overall[0]);
stats.setMax((Number) overall[1]);
stats.setAvg((Number) overall[2]);
stats.setCount((Number) overall[3]);
List<Object[]> hist = repoPdci.histogram(faoInstitute);
stats.makeHistogram(hist);
......@@ -1465,9 +1459,9 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
continue;
}
stats.updateMin((Float) overall[0]);
stats.updateMax((Float) overall[1]);
stats.updateCountAndAvg((Long) overall[3], (Double) overall[2]);
stats.updateMin((Number) overall[0]);
stats.updateMax((Number) overall[1]);
stats.updateCountAndAvg((Number) overall[3], (Number) overall[2]);
List<Object[]> hist = repoPdci.histogram(faoInstitute);
stats.makeHistogram(hist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment