Commit 37dcb6f254c4fef890069f0865be429f66814446

Authored by Nathanael Jourdane
1 parent 526b777c
Exists in master

Granule parsing: Cast float into double.

src/main/java/eu/omp/irap/vespa/epntapclient/granule/GranuleCtrl.java
... ... @@ -97,7 +97,13 @@ public class GranuleCtrl {
97 97 private Double parseDouble(int rowId, GranuleEnum granule) {
98 98 Double d = null;
99 99 try {
100   - d = (Double) data.getCell(rowId, granule.toString());
  100 + Object lObj = data.getCell(rowId, granule.toString());
  101 + if (lObj instanceof Double) {
  102 + d = (Double) lObj;
  103 + }
  104 + if (lObj instanceof Float) {
  105 + d = new Double((Float) lObj);
  106 + }
101 107 } catch (IllegalArgumentException e) {
102 108 LOGGER.log(Level.WARNING, String.format(ERROR_MSG, granule, rowId, "double.NaN"), e);
103 109 }
... ...