This content has been marked as final.
Show 2 replies
-
1. Re: converting a float to a double for persistence
fady.matar Nov 22, 2007 7:49 AM (in response to tom.baeyens)Mapping it to a string will make the problem harder what we could do for an instance is compute the difference between the result and the expected and then ignore it if it's negligeable, something like less than 0.001
so the assertEquals(expected, result) would be changed to
assertTrue(Math.abs((double) (result - expected) <= 0.001)
That's only a suggestion... -
2. Re: converting a float to a double for persistence
tom.baeyens Nov 22, 2007 8:05 AM (in response to tom.baeyens)my main question is: can we prevent jbpm from doing a float to double cast and back, cause that is what is causing this.
statement.setFloat(int, float); maybe ?