Commit Graph

3924 Commits

Author SHA1 Message Date
Tagir Valeev 98792cbf73 Revert substring(x).indexOf(y) -> indexOf(y, x) (IDEA-219640, case#3); was incorrect replacement
GitOrigin-RevId: f62ccdd76bd6353fe1bce95fe17ab4b3ca507dce
2019-11-25 09:31:23 +00:00
Tagir Valeev 25dc0f385c s.substring(s.length()-fooLen).equals(foo) -> s.endsWith(foo)
GitOrigin-RevId: 5dbd78e6359770f9680ef25dcf699297b5a28e46
2019-11-24 02:05:56 +00:00
Tagir Valeev 476b3ff5bb substring(x, x+y.length()).equals(y) -> startsWith(y, x) (IDEA-226148, case#1)
GitOrigin-RevId: 04fe1be3e9f48783ad8d95897497ea55109453f5
2019-11-22 06:36:34 +00:00
Tagir Valeev 7f8d9a2372 substring(x).indexOf(y) -> indexOf(y, x) (IDEA-219640, case#3)
GitOrigin-RevId: aab34215f1dc50e33af12cc56954dc17b9104318
2019-11-22 06:36:34 +00:00
Daniel Schmidt 909433482c Differentiate between type parameters and parameters (IDEA-226683)
PR#1243

GitOrigin-RevId: a91176d9f95e2803da7c1973c58ce4ee492fb703
2019-11-19 11:09:41 +00:00
Anna.Kozlova d4ff582489 assert no type execution under overload lock for diamonds
IDEA-CR-55327

GitOrigin-RevId: e2b1043a41b9548df3c2eb263a27da6d6c22b6be
2019-11-19 09:12:58 +00:00
Tagir Valeev 3fa35e0750 testResolveDiamondBeforeOuterCall simplified (TreeSet ctor overloads don't matter here)
GitOrigin-RevId: 6b303239bed1ffcfd94cbd54f781541e38dc5837
2019-11-15 10:05:32 +00:00
Tagir Valeev 85f72bfc0f testResolveDiamondBeforeOuterCall (fails if new expression type is requested before highlighting)
GitOrigin-RevId: b01abb3fbbebe28e3115aa109005851b62a02e7b
2019-11-15 08:03:12 +00:00
Artemiy Sartakov 7e0b374d13 OptionalToIfInspection: preserve comments
GitOrigin-RevId: 7e97d9997d6f0eaca40e1e9cd720dc27e7ca687a
2019-11-12 10:34:02 +00:00
Anna Kozlova eb79bfc3d3 java inference: ease assertion for lambdas in non-generic calls (EA-143883)
GitOrigin-RevId: 0e5ff0aa54375926c8ea5e2140458457250034dc
2019-11-08 21:03:13 +00:00
Anna Kozlova 41dd307bc0 incompatibility types tooltip: show varargs parameter once (IDEA-226535)
GitOrigin-RevId: 489681a2196ba79d39964ca0f8c3e6a24b3cff80
2019-11-08 20:04:06 +00:00
Anna Kozlova f45758ac79 redundant cast: support switch labels syntax (IDEA-226175)
GitOrigin-RevId: afdf87f8692f610ee87b9892c61f9ab97986bab8
2019-11-08 09:06:35 +00:00
Tagir Valeev 4cbd3eb2ca IDEA-226296 Forward compatibility inspection: fix testdata (IDEA-CR-54774)
GitOrigin-RevId: 4105f4fc0aa491ef5079e2a21830ef32ebd54b70
2019-11-07 02:40:58 +00:00
Tagir Valeev a815811dba IDEA-226296 Forward compatibility inspection
GitOrigin-RevId: eadb0e5ec707311f802879dd347fa7a72a67d0af
2019-11-07 02:40:58 +00:00
Tagir Valeev 9ab9138cdf IDEA-226284 Warn about unqualified 'yield' method usage
GitOrigin-RevId: ec260801f8968d0f70f919cf4104fd2c9a3498ed
2019-11-07 02:40:58 +00:00
Tagir Valeev 50b74c2848 IDEA-225861 Detect a case related to String transformation where result can be predicted before transformation
GitOrigin-RevId: 3448b86219bebc4914cccae89e7e46db67d81128
2019-11-07 02:40:58 +00:00
Anna Kozlova 856ec460c6 overload resolution: detect qualifier of unqualified call by processDeclaration's source where candidate was found
conflict resolution for static methods of the interface found by inheritance and nesting

GitOrigin-RevId: b637b02de4f59010a138c66890d1efcbcd1d588d
2019-11-07 02:40:58 +00:00
Tagir Valeev b04be5706b ReplaceCollectionStreamFix: handle comments
GitOrigin-RevId: 739c49a0f24a980ce19574b70cfe35c88c657026
2019-11-07 02:40:58 +00:00
Anna Kozlova d6297185ce java resolve: don't stop on found static method of the interface (IDEA-225660)
if the call site' qualifier is incorrect

GitOrigin-RevId: 782629045050df08fed3cf554682b63db8c9e1a8
2019-11-07 02:40:58 +00:00
Anna Kozlova ddf076a38c redundant suppression: simple global tools do not start if not enabled => no need to explicit check (IDEA-225676)
new inspection context doesn't contain any tools so one need to initialize context with tools explicitly to perform checks there

GitOrigin-RevId: b43cbccc70651b8a43783970af11a81cfb5b6847
2019-11-07 02:40:58 +00:00
Anna.Kozlova 628624c0c8 incompatible types tooltip: ensure vararg parameter is shown when first arg is compatible
GitOrigin-RevId: 70cc20169203f5dc857e73a84548089b6ebebc3c
2019-11-07 02:40:58 +00:00
Anna.Kozlova 184d54723d fix test data: shrink highlighted ranges
GitOrigin-RevId: 914c4649ead6ad18756161677578010e2d138bf9
2019-11-07 02:40:58 +00:00
Anna.Kozlova 13680758d9 java: incompatible varargs tooltip fixed (IDEA-225610)
highlight and show in tooltip only wrong arguments

GitOrigin-RevId: 9ccafd34fc549a84349d10b3cd7e0a233985e450
2019-11-07 02:40:58 +00:00
Tagir Valeev 5939a9e847 OptionalIsPresentInspection: support parentheses
GitOrigin-RevId: a69adf66817d6e9e23f1777ddef64d8aec0d49c6
2019-10-17 06:31:25 +00:00
Tagir Valeev 3806f7df31 Redundant files removed (left after merging several tests together)
GitOrigin-RevId: 15755e36cbdfefdf493ce28c9b2155e7b2daa7d6
2019-10-14 11:04:47 +00:00
Tagir Valeev a5474b0313 IDEA-207434: add generic args when necessary (IDEA-CR-53399)
GitOrigin-RevId: a273d8198f8a19921a4075ed93c81fd84a8bee63
2019-10-14 10:32:59 +00:00
Alexey Kudravtsev 2b081e39ab make some clients independent of order of results in Query.findAll()
GitOrigin-RevId: df14c535f9ff642399ed42e123563dac3db8bb20
2019-10-11 15:33:13 +00:00
Tagir Valeev c78392d802 IDEA-177238 QuickFix for "Casting ... to ... may produce ClassCastException"
GitOrigin-RevId: 000f7b616edb300b98cdefe04d954c5023365f8c
2019-10-11 12:32:08 +00:00
Anna.Kozlova 4e4396b0c8 incompatible types tooltip: highlight generic type components in the multiple args mismatched tooltip
GitOrigin-RevId: a1b3fec553161841a559e45c2a76e9d46b12975f
2019-10-11 09:06:02 +00:00
Tagir Valeev 6fdffcb1b5 IDEA-207434 Comprator.comparing(Map.Entry::getKey) -> Map.Entry.comparingByKey()
GitOrigin-RevId: 9481f1e30f7262576ae132295fa27f9777396896
2019-10-11 09:06:02 +00:00
Anna.Kozlova 589b029a97 java method ref highlighting: don't mirror errors of not applicable methods of return type (IDEA-224306)
GitOrigin-RevId: 40b4293c754640445b9fac741eab24261e8060cc
2019-10-10 10:03:10 +00:00
Anna.Kozlova 87deef960c incompatible types: highlight parent call instead of lambda when the error isn't related to lambda (IDEA-218801)
GitOrigin-RevId: 17a2f1f62f7703930aa25a8cfd6dfd4a918e1fe7
2019-10-10 07:01:11 +00:00
Anna Kozlova 5b3ef443c9 incompatible types tooltips: use short type names at varargs position (IDEA-224305)
GitOrigin-RevId: cd5dc23e741098d6158dc9ebec666a1a600e1700
2019-10-09 19:04:16 +00:00
Anna.Kozlova 8db821428d lvti: special highlight for self referencing variables (IDEA-224449)
assume that null as type of the left side of the assignment is not possible

GitOrigin-RevId: c407cdc11e991c8db24ffd683f3b8ea883d41244
2019-10-09 10:32:32 +00:00
Roman.Ivanov 9b798e3ece SortContentAction: replace with proper annotation member value instead of expression : IDEA-224254
GitOrigin-RevId: 687fc8771babc84d3ebc07ad4fe04c4543fed36e
2019-10-08 10:01:33 +00:00
Bas Leijdekkers 311f965f20 on demand static import -> on-demand static import (IDEA-221475)
GitOrigin-RevId: 3cdbe9a8fbad5b785934f8f6280e4140cb8aa75c
2019-10-03 16:04:14 +00:00
Artemiy Sartakov 37137f76ac AbstractJavaBlock: added formatting for java text blocks (IDEA-216737)
GitOrigin-RevId: 091cd09f3dac6b9d3dc130d5e2e65bee5fd88792
2019-10-03 04:32:43 +00:00
Roman.Ivanov eac8432bb6 Basic test for method extract: IDEA-CR-53127
GitOrigin-RevId: 3c41530c54d0d26076f65bc38f23993b82e7f56f
2019-10-02 15:08:26 +00:00
Anna Kozlova bb650d3c68 redundant suppressions on the fly: check alternative ids, old suppress ids (IDEA-223759)
GitOrigin-RevId: 3d1332fd4cdb1bdd39c26de6713cf6f464fc61e3
2019-10-01 10:11:58 +00:00
Artemiy Sartakov 4f473648ee OptionalToIfInspection: tests for parenthesized expression and partial chains (IDEA-CR-52832)
GitOrigin-RevId: cbfa6550167e9dd9e157ab860a6ead486938f2cd
2019-09-25 08:31:20 +00:00
Tagir Valeev acb3387b1c IDEA-223192 Non-initialized variable error is not displayed in nested switch statement
GitOrigin-RevId: 850afa74fb22dd858bdc8ff7903946678e53d82c
2019-09-24 08:02:50 +00:00
Tagir Valeev f127b4491c DeleteSideEffectsAwareFix: fix removal of for-update statement
GitOrigin-RevId: 15a64c215cc98f4f94b76edc3486bcf762a8be28
2019-09-24 05:31:27 +00:00
Dmitry Batkovich ef54a16d1e fix testdata
GitOrigin-RevId: b96781775bd0583ebc134e75214189ec69717a04
2019-09-23 11:02:12 +00:00
Anna Kozlova 1768efa804 incompatible types: highlight only wrong arguments instead of full arg list (IDEA-220107)
GitOrigin-RevId: 38a12e4fa7ea27d156dae1fe6bc7bd6902db6251
2019-09-20 19:31:36 +00:00
Anna Kozlova fb5f755910 java inference: prevent recursive conflict resolution when it isn't prevented by ResolveCache guard
advanceResolve(incomplete=true) prevents guard to work

GitOrigin-RevId: 437ec02af808a89c8339909411bec6d95ff225dc
2019-09-13 07:12:19 +00:00
Artemiy Sartakov caac9ef3d8 StringLiteralCopyPasteProcessor: keep indent for multiline paste into text block (IDEA-217406)
GitOrigin-RevId: b1a5d55f8749fea0002723ae2a6b2370fb8ed4ab
2019-09-11 12:11:55 +00:00
Artemiy Sartakov 550b0aeb8b TextBlockMigrationInspection: added inspection that reports cases when string or concatenation can be converted to text block (IDEA-217333)
GitOrigin-RevId: 50750c58f63d1289b236c612ed33e0655b66ef76
2019-09-11 06:02:36 +00:00
Anna Kozlova d829a7c8f4 java inference: ensure that applicability check is not re-entered
this fixes assertion
	at com.intellij.util.ObjectUtils.assertNotNull(ObjectUtils.java:84)
	at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:453)
caused by including expression compatibility constraints for expressions inside lambdas for which parameter types are calculated

GitOrigin-RevId: 0588bff4a719fb73ff49a51bc86635e56cd8d146
2019-09-05 19:19:32 +00:00
Anna Kozlova 55426d88a9 java resolve: ensure cached all qualifiers do not lead to cached types based on ThreadLocalTypes values
fixes failed check for different types returned on different threads (see JavaResolveCache#reportUnstableType)

GitOrigin-RevId: a5efd5e5a9657ad55c74e413185959c517e341e8
2019-09-01 17:03:16 +00:00
Bas Leijdekkers ea73b88a7c psi: don't insert unnecessary parentheses when replacing expression (IDEA-220761)
GitOrigin-RevId: 7fe48d0f72581221a633373933b941c09b2c69ed
2019-08-22 01:50:10 +03:00