Vladimir Krivosheev
809b7ca201
deprecate ServiceManager.getService(project)
...
GitOrigin-RevId: 3805c3aac4e084c828558bf1b1570339f7f3b4a3
2021-03-26 21:30:32 +00:00
Andrey.Cherkasov
455a130ac2
IDEA-216120: fixes after review
...
GitOrigin-RevId: 44435772a108dc0a9edad4e56a00a27cc2f91efc
2021-03-26 00:47:47 +00:00
Tagir Valeev
8466dca993
[java-dfa] containsConstant should ignore locality if values are compared by equals
...
Fixes IDEA-265089 ConstantCondition always false incorrectly reported on String.equals with String literal on left side
GitOrigin-RevId: 4e128a8308a9813bba953e107400c51879a6e7f2
2021-03-25 05:55:08 +00:00
Tagir Valeev
577f1b722b
[java-highlighting] IDEA-265125 Do not highlight 'var' in case if there's a constructor of unresolved type on the right
...
GitOrigin-RevId: 9ac23e0dcf11c2031c7f08ebd5c6d707d4f7bed1
2021-03-25 05:55:05 +00:00
Tagir Valeev
a3e6b55f19
[java-dfa] Ignore some contracts if method return value is not used
...
GitOrigin-RevId: 2834d00f1385759947351f8b93d8fc6a18a45106
2021-03-24 23:54:51 +00:00
Tagir Valeev
b5f948dd5f
[java-highlighting] IDEA-265053 Highlight not-wellformed statements without semicolon as a "not-a-statement"
...
Also suggest 'introduce local variable' as a quick-fix
GitOrigin-RevId: 2a15a1d35ed1755ab043a40a06136ed946c4a516
2021-03-24 23:54:49 +00:00
Bart
b3a6e7ebd2
[jvm] IDEA-231329 Convert @TestOnly inspection to UAST
...
GitOrigin-RevId: 15230423d944e7b3a236f401bdc251dabb7d5586
2021-03-23 10:35:38 +00:00
Dmitry Gridin
02f2da1884
[java] rethrow PCE
...
GitOrigin-RevId: b651e234f839e87f61af80821cf827b833e243df
2021-03-23 07:02:17 +00:00
Nikita Eshkeev
af4bd9a9cd
[EA-259285] CharTable not found in: PsiCodeBlock
...
RedundantThrowsDeclarationInspection used to try to remove or replace try statements regardless if their corresponding PSI elements are still valid. Since PSI nodes were being removed or replace in the loop some of them got to become invalid and when BlockUtils#unwrapTryBlock was invoked on an invalid PSI element it threw the AssertionError. This patch adds checks if the PSI element that is being processed is still valid and if it is not, then stop processing such PSI elements.
GitOrigin-RevId: 6d071ef7888f46bbda10b6d99853ef338055f3a6
2021-03-22 21:37:33 +00:00
Dmitry Batkovich
d5d82af58a
remove method unused parameter
...
GitOrigin-RevId: 44de250731f8fea3938ba70fd2e172d58b8d2d46
2021-03-22 14:20:44 +00:00
Nikita Eshkeev
4cbb22cb80
[EA-260251] IAE: Internals.checkLength: fixes after review
...
This patch fixes the logging so no users' code is leaked due to the logger. The logger prints the information about the method's class (whether or not it's PsiMethodImpl) and adds the method's throws list as an attachment.
GitOrigin-RevId: 5bb243e1922ab729ba2077bb32969ff7a521c87f
2021-03-22 14:03:48 +00:00
Tagir Valeev
c6f29339aa
[java-dfa] Avoid canonicalizing when flushing from LVA
...
GitOrigin-RevId: f1ba8fc87ede4835e98ed2aceaa792f66a9a529b
2021-03-22 11:11:33 +00:00
Tagir Valeev
fb9d66a421
[java-dfa] Better support for wrapped values
...
GitOrigin-RevId: 642d53771fd32fe9b95ca270b79177e4f7ea8c3a
2021-03-22 09:16:09 +00:00
Tagir Valeev
3786c6b998
[java-dfa] Preserve oddity inside +=2 loops
...
GitOrigin-RevId: a4d4318d86d4fe5fc4b26f4fc4b94d1725c0f140
2021-03-22 09:16:06 +00:00
Tagir Valeev
7b4a3a5f9d
[java-dfa] IDEA-264858 Track collection sizes of derived collections
...
GitOrigin-RevId: 8cf915a8d96cf97be92d0a5cfd0a3e35e1bae9f9
2021-03-22 07:11:09 +00:00
Tagir Valeev
deac836e07
[java-inspections] Suggest adding the annotation only if it's available and has TYPE_USE target
...
GitOrigin-RevId: c11bf9a6cc5e538570ac362311e49e1b6f322cca
2021-03-22 07:11:08 +00:00
Tagir Valeev
0ccbae9091
[java-dfa] ContractReturnValue: redundant suppression removed
...
GitOrigin-RevId: ea8392ad5765134c7faca04b408f17f643b7e7f1
2021-03-22 07:11:06 +00:00
Nikita Eshkeev
1ca409bb0d
[EA-260251] IAE: Internals.checkLength: fixes after review
...
This patch eliminates the StreamEx#zip method's invocations as per the review request and the type of an element from a throws list is calculated via PsiElementFactory instead of calling PsiReferenceList#getReferencedTypes. This patch also adds logging if an inconsistency between Stub and PSI is detected in order to better understand what causes the inconsistency.
GitOrigin-RevId: c1f9bfa5f88292496cb9e3ff8f7a7a1962d3a8b1
2021-03-19 13:25:40 +00:00
Louis Vignier
65b7f80ce4
[java] Fix quotes in inspection descriptions
...
GitOrigin-RevId: e227c0708730b61eae81871bb9b1013853d8b4b2
2021-03-19 12:07:46 +00:00
Ilyas Selimov
4f88aa3a1c
performance - reverted and fixed some optimizations in DFA
...
GitOrigin-RevId: 0cd6f6d1477a08c3ff2130eb7e2255dbb1c5472e
2021-03-19 08:29:58 +00:00
Tagir Valeev
afc371e029
[java-inspections] Quick-fix for missing not-null annotation on type element
...
GitOrigin-RevId: 6c7d91b8f30015eb1b5f51be422951ba8ef6b36b
2021-03-19 07:27:28 +00:00
Tagir Valeev
cf2a321abc
[java-dfa] flushVariable: canonicalize before flush
...
Otherwise, we may try to remove variableType of wrong alias
Fixes IDEA-264644 toCollection(() -> list) is not recognized as mutation method for list
GitOrigin-RevId: ea9b87d3aed5fa187fd13565bd433af5c044d536
2021-03-19 05:48:20 +00:00
Nikita Eshkeev
6e9eaad471
[EA-260251] IAE: Internals.checkLength
...
This patch adds the check that the length of referenceElements in the throws list is equal to the length of referenceTypes, because the StreamEx#zip validates that the arguments have to be of the equal length
GitOrigin-RevId: 4b41400e564e3d86a0bb09529c3edd6c6b6d304d
2021-03-18 14:11:47 +00:00
Andrey.Cherkasov
f75bc6d37a
ConvertInterfaceToClassFix: fixes after review IDEA-216274
...
GitOrigin-RevId: cd0ac910a3e49f5329e34aee2751fd78c133e31f
2021-03-18 10:49:53 +00:00
Tagir Valeev
1e53d86ca5
[java-inspections] EqualsAndHashcode: do not report Java records that have hashCode but no equals (IDEA-264394)
...
GitOrigin-RevId: 15f83c984ebb807f9966407bf03a7e402c3ffded
2021-03-17 03:02:05 +00:00
Anna Kozlova
1d4af843d3
EA-260820 - SIOOBE: Type.getReturnTypeOffset
...
GitOrigin-RevId: 583cf1dff6d461e17d29b3033d8560170899ad86
2021-03-16 16:27:16 +00:00
Louis Vignier
170c838207
[java] Update inspection descriptions
...
GitOrigin-RevId: 1c55fac4ca08678e76aee02962ddf12153dd51cd
2021-03-16 14:56:20 +00:00
Louis Vignier
d830ccbf28
[java] Update inspection descriptions
...
GitOrigin-RevId: c9f960eb87b520f47644c31cdfabf03434ee9b59
2021-03-16 14:56:18 +00:00
Ilyas Selimov
64c30d9923
JavacQuirks - revert occasional fix
...
GitOrigin-RevId: 777bcca61b4515d9126631edbceda3dce093bc1d
2021-03-16 07:50:26 +00:00
Anna Kozlova
0b997bcaa0
java inspection descriptions updated
...
Deprecation.html; JavacQuirks.html; LoopConditionNotUpdatedInsideLoop.html; RawUseOfParameterizedType.html; UnnecessaryBoxing.html; TryWithIdenticalCatches.html; Anonymous2MethodRef.html; UnnecessaryLabelOnBreakStatement.html; StringBufferReplaceableByString.html; BusyWait.html; MetaAnnotationWithoutRuntimeRetention.html; TextLabelInSwitchStatement.html; SuspiciousIntegerDivAssignment.html; StringEquality.html; ReflectionForUnavailableAnnotation.html; NumberEquality.html; IterableUsedAsVararg.html; StringConcatenationInsideStringBufferAppend.html; ClassInitializerMayBeStatic.html
GitOrigin-RevId: 406bd9fd5e56ec9b30442d28591c8e759b8627cf
2021-03-15 14:48:35 +00:00
Ilyas Selimov
21e0f80a96
performance - small optimizations in DFA
...
GitOrigin-RevId: 305e5d03f4280bb99866c8912e5dd25a8392ca59
2021-03-15 07:06:03 +00:00
Tagir Valeev
7a0831408f
[java-highlighting] IDEA-264182 Do not report 'Annotations are not allowed here' in unterminated parameter list
...
GitOrigin-RevId: 6c6aff57643ec10b1ba2c44b52e6db352d43513a
2021-03-12 13:26:52 +00:00
Andrey.Cherkasov
430ad9a42a
[java-highlighting] IDEA-216120 Provide fix for the "Illegal initializer for ..." error
...
GitOrigin-RevId: edf4f5e72243afe44f0bcbbacd2e753a2e5faf1e
2021-03-12 10:42:19 +00:00
Ilyas Selimov
a2745001a9
IDEA-196862 - expanded hierarchical meta annotations processing to ignored and standard annotations
...
GitOrigin-RevId: 98890472e23e69068bb3a95f8f9460f6e288dfa9
2021-03-12 10:23:29 +00:00
Tagir Valeev
72626c4d29
[java-analysis] SuppressFix: avoid accessing invalid element after suppression is performed
...
Fixes EA-260182 - PIEAE: LeafPsiElement.invalid
GitOrigin-RevId: db71dec95345c551af7dfba1831d7cd81dc86930
2021-03-12 09:05:43 +00:00
Alexey Kudravtsev
f857875838
notnull
...
GitOrigin-RevId: ede492a63d3325613dee1eb4bf0e2bc2feb89756
2021-03-11 15:44:25 +00:00
Alexey Kudravtsev
34db17a916
optimisation: get rid of unnecessary stream allocation in some places in platform
...
GitOrigin-RevId: 2ae3a005678892ef2bae85b33b5ceb22fe46cea3
2021-03-11 15:39:51 +00:00
Ilyas Selimov
2da95e3f5d
IDEA-196862 - added hierarchical meta annotations processing
...
GitOrigin-RevId: d7b4c2aa0c251b6fb2913927994ec4c5a61e6538
2021-03-11 13:30:24 +00:00
Andrey.Cherkasov
59907581a6
[java-inspections] IDEA-216271 Remove custom priority of CreateConstructorMatchingSuperFix for "Ambiguous method call"
...
GitOrigin-RevId: e07ef70a632f356fa4d9cba92a35128f22ab96ee
2021-03-11 13:23:50 +00:00
Tagir Valeev
5a04ca5310
[java-inference] Failure contract: better null->fail inference (IDEA-230802)
...
GitOrigin-RevId: 778b9be125871e9002c719fb50f205a202439b2f
2021-03-11 11:27:57 +00:00
Tagir Valeev
b4c69a9cec
[java-inference] Failure contract inference improved
...
GitOrigin-RevId: 687b4c909c1d2ae67d519ec71899d52fa3e29434
2021-03-11 11:27:56 +00:00
Ilyas Selimov
173a2a03e1
IDEA-196862 - added meta annotations processing
...
GitOrigin-RevId: c9cc025971ab76606d5d670efe9a472b3c9bd067
2021-03-10 19:48:39 +00:00
Andrey.Cherkasov
de64886d9e
[java-highlighting] IDEA-216271 Provide fixes for the "Ambiguous method call" error
...
GitOrigin-RevId: c2cbd4f561b4d77b43a31d08b3ec8bb58f265f42
2021-03-10 12:24:57 +00:00
Aleksandra Zolushkina
3317739512
Proofread text in QuickFixBundle #proofread
...
ff4c5fc6fa17d2d78c9ac785ce09ceb5860d29bc,
(ac3611928f03ee4f221e1c68a09a94ef3ef9f017, 125531512ed1e3915ce37c6bdff34a0ed44d153c, 90ed58f0f0634fd0359142489aef1de73009a306)
GitOrigin-RevId: 2a5f9418b4d16d125d0bd04e738c01905ab7c2ba
2021-03-10 09:54:02 +00:00
Andrey.Cherkasov
c19534589b
[java-highlighting] IDEA-216274 Provide fix for the "Not allowed in interface" error
...
GitOrigin-RevId: 1290ab27997b03c6a75b1c8172a3477722144941
2021-03-10 01:57:16 +00:00
Roman Shevchenko
f35ec3bc15
Cleanup (warnings; formatting)
...
GitOrigin-RevId: dd7be54aefc1ab20c7f4b24fb46d139908eeec67
2021-03-09 21:19:51 +00:00
Andrey.Cherkasov
64323d8ab0
[java-highlighting] Change text of fix for duplicate interfaces implemented
...
GitOrigin-RevId: a2b6f39e8722928193ff4c3ea9a65e4a9f041fd8
2021-03-09 15:44:23 +00:00
Tagir Valeev
cae5d31945
[java-dfa] Handling special cases for modular division
...
GitOrigin-RevId: 1acfd9722b1e171abd61181d35f856e3eba171eb
2021-03-09 10:26:27 +00:00
Tagir Valeev
3d0fc89544
[java-dfa] Apply relations like a>b on a=b+c if c>0 & no overflow
...
GitOrigin-RevId: 604d68f6741b9fde615067e3295ac7dce7cea286
2021-03-09 10:26:25 +00:00
Tagir Valeev
125e80de25
[java-dfa] Fixes in locality checks
...
1. ConstructionUtils.isCollectionConstructor checks whether an argument method is actually a constructor
2. HardcodedContracts.NO_PARAMETER_LEAK_METHODS: add putAll, removeAll, retainAll
3. Purity contract for contains/containsAll
GitOrigin-RevId: 00b68f68ef1c69ab996ff9a04d50ea5228ac629e
2021-03-05 13:31:19 +00:00