Removed usage of Java8 method Float#isFinite(float)

Signed-off-by: Matthias Stevens <matthias.stevens@gmail.com>