Should help BAZEL-852 IntelliJ incorrectly infers "Contract(pure = true)" annotations for methods from ijar-s produced by Bazel
GitOrigin-RevId: 2fdfc9166737d0aba84372a5a2d127aeeb747f9d
Fixes IDEA-354381 Unreachable code inspection fails when using Streamable.of()
Unfortunately, the test does not differentiate the bug. I failed to write a good test in a reasonable amount of time. Nevertheless, the original issue is fixed.
GitOrigin-RevId: 55b0f169c93d1cef9453c3eb88959ea4832a917a
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
Now we have Code Vision hints which determine the author via Git history and show it in the editor automatically, and this information is more accurate than the tags which were automatically added when files were created.
GitOrigin-RevId: 535941a4b79bc36c173a27f3e505b43ffc85edc1
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