Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a safety check.

Change-Id: Id8a6a7ef31bd98c7559de79e7aba660dd1618ed6
  • Loading branch information...
commit 37dd3dfe3becc3cefb5eb37ecaa012105756cd46 1 parent 37aeb8b
@tsuna tsuna authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/core/SpanGroup.java
View
3  src/core/SpanGroup.java
@@ -754,6 +754,9 @@ public double nextDoubleValue() {
? Double.longBitsToDouble(values[prev])
: values[prev]);
final long x1 = timestamps[prev] & TIME_MASK;
+ assert x0 > x1: ("Next timestamp (" + x0 + ") is supposed to be "
+ + " strictly greater than the previous one (" + x1 + "), but it's"
+ + " not. this=" + this);
final double r = (y0 - y1) / (x0 - x1);
//LOG.debug("Rate for " + y1 + " @ " + x1
// + " -> " + y0 + " @ " + x0 + " => " + r);
Please sign in to comment.
Something went wrong with that request. Please try again.