Closed dktcoding closed 7 years ago
I have seen this behavior before in java applications, it depends on the host OS the implementation of currentMillis. In linux it works as expected, whereas in windows the the currentMillis doesn't give milliseconds but just seconds.
I've been writing and running some tests and found a somewhat troubling behavior, multiple invocations to
Matrix.random()
will return the exact same matrix...This is actually fascinating, I wrote the tests on my laptop and the work perfectly and when I got home they didn't work (I don't own a very good laptop...),
The proposed change is simply to make the tests work, but in the future I much rather pass a
Random
object to random initializers, and useThreadLocalRandom.current()
for uninitialized random objects.