Should help BAZEL-852 IntelliJ incorrectly infers "Contract(pure = true)" annotations for methods from ijar-s produced by Bazel
GitOrigin-RevId: 2fdfc9166737d0aba84372a5a2d127aeeb747f9d
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
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