mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
more assertions
This commit is contained in:
@@ -537,12 +537,12 @@ public abstract class IntervalTreeImpl<T extends MutableInterval> extends RedBla
|
||||
}
|
||||
|
||||
protected void checkBelongsToTheTree(T interval, boolean assertInvalid) {
|
||||
if (!VERIFY) return;
|
||||
IntervalNode root = lookupNode(interval);
|
||||
if (root == null) return;
|
||||
assert !root.intervals.isEmpty();
|
||||
|
||||
assert root.getTree() == this;
|
||||
assert root.getTree() == this : root.getTree() +"; this: "+this;
|
||||
if (!VERIFY) return;
|
||||
boolean contains = false;
|
||||
for (int i = root.intervals.size() - 1; i >= 0; i--) {
|
||||
T key = root.intervals.get(i).get();
|
||||
|
||||
@@ -101,9 +101,7 @@ public class RangeMarkerTree<T extends RangeMarkerEx> extends IntervalTreeImpl<T
|
||||
|
||||
@Override
|
||||
protected void checkBelongsToTheTree(T interval, boolean assertInvalid) {
|
||||
if (!VERIFY) return;
|
||||
assert ((RangeMarkerImpl)interval).myDocument == myDocument;
|
||||
|
||||
super.checkBelongsToTheTree(interval, assertInvalid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user