fixing test failure on some systems
Merge pull request #304 from apavlenko:test_java_fix_double