Unidata / thredds

THREDDS Data Server v4.6
https://www.unidata.ucar.edu/software/tds/v4.6/index.html
265 stars 179 forks source link

Robustly parse strings that represent NaN and Infinity #569

Open cwardgar opened 8 years ago

cwardgar commented 8 years ago

From the mailing list:

In NetCDF-Java and THREDDS, we currently use Double.valueOf (or similar) to parse strings as floats. As the Javadoc states, only the literal string "NaN" is interpreted as Not-a-Number and only the literal string "Infinity" is interpreted as infinity. We ought to be more lenient. At the least, do case-insensitive matching and accept the "inf" string.

DennisHeimbigner commented 8 years ago

Agreed, although finding all the relevant places may be a bit of a chore.