requires Java 8
Closed this issue · 1 comments
dmalan commented
While Java 8 has Double.isFinite, Java 7 unfortunately doesn't. With CS50 IDE still on Ubuntu 14.04 (and CS50 CLI similarly fixed at Ubutu 14.04 until CS50 IDE changes), building edu.harvard.CS50 yields:
$ javac -d build src/edu/harvard/CS50.java
src/edu/harvard/CS50.java:122: error: cannot find symbol
if (Double.isFinite(d) && d < Double.MAX_VALUE)
^
symbol: method isFinite(double)
location: class Double
src/edu/harvard/CS50.java:162: error: cannot find symbol
if (Float.isFinite(f) && f < Float.MAX_VALUE)
^
symbol: method isFinite(float)
location: class Float
2 errors
make: *** [build] Error 1
kzidane commented
fixed per 7e639b9! see Double.isInfinite() and Float.isInfinite()!