Also: avoid manual mocking of Java 10 classes in StreamCollector10Inlining test, use mockJDK11 instead
Also: rewrite SliceTestCase and its inheritors to LightJavaCodeInsightFixtureTestCase, as annotations.jar is not included into project created by DaemonAnalyzerTestCase
Also: 'mutates' attribute of @Contract annotation is resolvable now, as we can use newer jetbrains-annotations library.
Also: documentation tests now don't generate links to JetBrains annotations, which corresponds to the actual behavior in production
GitOrigin-RevId: e460826893c1277cb2b78b18aae9d5aca97d8333
We assume that such methods return local object. However, we also assume that Collection/Map size is its field. But in fact, it may delegate to another collection
Fixes IDEA-266180 Constant conditions & exceptions false positive with Guava Lists
GitOrigin-RevId: ba6f76bd1b34b1b9503b4be1ce85119ba54f6b3e
1. Stop loading equations if the solution is definitely impure and return value is known
2. Replace "mutates" map with single value in MethodAnnotations
GitOrigin-RevId: 1fd25b97060b3f5a3c9ce3b22c24baa10d35a6f7
This allows contract inference for methods like AssertionError(Object) constructor.
Fixes IDEA-260003 A warning is shown when Optional.get is called even when Optional.isPresent is verified before
GitOrigin-RevId: 548008f5462b828e0346f089474182f59ec39bd1
New key = java.annotations.inference.aggressive.hardcoded.purity (true
by default). Implies purity for Object.toString(), Iterable.iterator(),
Iterator.hasNext() and this-changing Iterator.next(). Parameter-changing
mode supported for hardcoded purity.
1. Lambda/method reference creation is pure
2. String concatenation is pure
3. Constructor which only modifies own fields (calls setters, etc.) is pure
4. Exception creation is pure
5. A few hardcoded native methods
(annotations.xml was changed because the order of graph construction was changed - this particular case is a tricky one with loop, exception and synchronization)