Closed DavidStreid closed 3 years ago
Change: Integer numDays = 0; -> Long numDays = 0L;
Integer numDays = 0;
Long numDays = 0L;
There's an Integer overflow when calculating the search point w/ days * 24 * 60 * 60 * 1000, e.g. long searchpoitn = System.currentTimeMillis() - (numDays * 24 * 60 * 60 * 1000). numDays needs to be changed to a Long
days * 24 * 60 * 60 * 1000
long searchpoitn = System.currentTimeMillis() - (numDays * 24 * 60 * 60 * 1000)
numDays
e.g.
System.out.println(Integer.MAX_VALUE + 1); // -2147483648 System.out.println(Integer.MAX_VALUE); // 2147483647
so {ANYTHING} minus {ANY_LARGE_INTEGER} is yielding some incorrect results
{ANYTHING} minus {ANY_LARGE_INTEGER}
Can one of the admins verify this patch?
Change:
Integer numDays = 0;
->Long numDays = 0L;
There's an Integer overflow when calculating the search point w/
days * 24 * 60 * 60 * 1000
, e.g.long searchpoitn = System.currentTimeMillis() - (numDays * 24 * 60 * 60 * 1000)
.numDays
needs to be changed to a Longe.g.
so
{ANYTHING} minus {ANY_LARGE_INTEGER}
is yielding some incorrect results