avoid assertions for contains request (SortedIdSet.java:168) phpstorm/142.4581
authorMaxim.Mossienko <Maxim.Mossienko@jetbrains.com>
Fri, 4 Sep 2015 09:32:29 +0000 (11:32 +0200)
committerMaxim.Mossienko <Maxim.Mossienko@jetbrains.com>
Fri, 4 Sep 2015 09:40:12 +0000 (11:40 +0200)
platform/lang-impl/src/com/intellij/util/indexing/containers/SortedIdSet.java

index 3e77e25aad7b1393e9c9f52f8535a7df6c1ed7bd..fdb459784761120d97e29f4d15f5d895cd671390 100644 (file)
@@ -165,7 +165,7 @@ public class SortedIdSet implements Cloneable, RandomAccessIntContainer {
   }
 
   public boolean contains(int value) {
-    assert value > 0;
+    if(value <= 0) return false;
     int pos = binarySearch(mySet, 0, mySetLength, value);
     return pos >= 0 && mySet[pos] > 0;
   }