Commit Graph

3370 Commits

Author SHA1 Message Date
Tagir Valeev 79ed1b2dc3 shortenClassReferences: dequalify references which are statically imported 2018-06-14 10:08:16 +07:00
Anna Kozlova dc43909e2c ensure no inference from not inferred var (IDEA-193828) 2018-06-13 21:00:17 +03:00
Tagir Valeev f4839c89ea BaseStreamApiMigration: when deleting the initializer replace type with explicit if possible
Fixes IDEA-193618 Invalid code generated after "Can be replaced with 'collect' call"
2018-06-13 11:14:54 +07:00
Roman Shevchenko eabcde2868 [java] 'var' arrays highlighting (IDEA-193514) 2018-06-08 17:28:55 +03:00
Tagir Valeev 62792959f0 More tests for this handling in javac 2018-06-08 13:27:58 +07:00
Tagir Valeev 51af524343 LocalsOrMyInstanceFieldsControlFlowPolicy: allow parentheses
See also IDEA-156926, JDK-8156180
2018-06-07 17:55:13 +07:00
Tagir Valeev d90e0b79e5 LocalsOrMyInstanceFieldsControlFlowPolicy#isLocalOrMyInstanceReference extracted
Fixes parentheses handling like (this).x. Review ID: IDEA-CR-33345
2018-06-07 16:11:00 +07:00
Tagir Valeev 698afa3b24 LocalsOrMyInstanceFieldsControlFlowPolicy: disallow qualified this
According to JLS Chapter 16 qualified "this" is not considered as reference to field in definite assignment analysis
Fixes IDEA-193386 Good code is red: Variable may not have been initialized
2018-06-07 11:28:07 +07:00
Rustam Vishnyakov e9d34426d0 Test data fix 2018-06-06 15:44:16 +03:00
Anna Kozlova c43b6f20de completion: check parent overloads for constructor calls as well (IDEA-187354) 2018-06-05 17:13:42 +03:00
Tagir Valeev ec483ef976 IDEA-193288 Inspection to detect Xyz.class.isInstance(foo) and Xyz.class.cast(foo) 2018-06-05 12:21:58 +07:00
Roman.Ivanov ae37e14386 fix foreach formatting in tests 2018-06-05 11:58:44 +07:00
Roman.Ivanov 5858ba478c fix tests for foreach formatting 2018-06-05 11:31:17 +07:00
Anna Kozlova ae8064fe15 split declaration: insert missed semicolon (IDEA-192958) 2018-06-04 18:44:40 +03:00
Anna Kozlova 0d0354fdab add cast: don't unbox for null types (IDEA-193174) 2018-06-04 18:44:40 +03:00
Anna Kozlova 1ef91b8eb4 split declaration: fix comments in context 2018-06-04 15:27:40 +03:00
Anna Kozlova 31fd8cfe08 create from usage: don't ignore types if no expected methods detected
IDEA-193066 check expected type as well by another expression
2018-06-01 20:04:05 +03:00
Roman.Ivanov 7db02bc177 CreateTypeParameterFromUsageFix: ignore reference expr: IDEA-193060 2018-06-01 18:09:17 +07:00
Anna Kozlova db4d62e485 change test data to be more realistic 2018-06-01 11:15:29 +03:00
Anna Kozlova f1862f7e01 refactor after review IDEA-CR-33048 2018-05-30 16:31:02 +03:00
Tagir Valeev 3c2cd21d35 MigrateToStreamFix: explicit formatting removed (as formatted anyways automatically) 2018-05-30 18:23:38 +07:00
Roman.Ivanov a591f4e58e CreateTypeParameterFromUsage: ignore when identifier is in call
IDEA-192775
2018-05-30 11:01:20 +07:00
Roman.Ivanov 9b9ec7708c CreateTypeParameterFromUsage: ignore qualified references: IDEA-192528 2018-05-30 11:01:19 +07:00
Anna Kozlova 5d77379fd3 create field from parameter even if parameter is already used in assignment
IDEA-192896
2018-05-29 20:54:23 +03:00
Anna Kozlova b3a949ef5f javadoc inspection: check missed type parameters javadoc (IDEA-192696) 2018-05-28 18:54:02 +03:00
Anna Kozlova 323a164d0c convert field to local: clear final modifier when used for write (IDEA-192735) 2018-05-28 18:54:02 +03:00
Anna Kozlova ab271fcb5b inference: partially resolve before erasure for target type inference
IDEA-192208
2018-05-28 18:54:01 +03:00
Anna Kozlova 4dfc2dbe6c restore comments on Insert New 2018-05-28 13:08:22 +03:00
Tagir Valeev 0269e72a79 IDEA-191856 "Replace Optional.isPresent() condition with functional style expression" creates bad code when used with Type Promotion 2018-05-24 12:44:33 +07:00
peter 9a96704d9a "add on demand static import": avoid stub/text inconsistency on unnamed references 2018-05-23 18:07:58 +02:00
Roman.Ivanov c99d0a99af ChangeUIDAction: make it work without initializer 2018-05-23 16:29:11 +07:00
Anna Kozlova c9d3d04e73 method ref: ensure capture conversion on first arg of second search 2018-05-22 15:48:15 +03:00
Roman.Ivanov ea2ac73af8 ChangeUIDAction: fix review issues: IDEA-CR-32493 2018-05-22 17:14:46 +07:00
Roman.Ivanov 5f3a81b04a VariableAccessFromInnerClassJava10: fix review issues: IDEA-CR-31797 2018-05-22 16:58:34 +07:00
Roman.Ivanov 7504c18421 AddExceptionToExistingCatch: fix collecting try statements IDEA-CR-30935 2018-05-22 15:47:32 +07:00
Anna Kozlova e077fa59eb access static via interface class: fix case without qualifier (IDEA-192246) 2018-05-22 11:06:00 +03:00
Anna Kozlova e524d46129 convert to local: restore comments once (IDEA-192268ˆ) 2018-05-18 20:16:28 +03:00
Roman Shevchenko 57fb172991 Cleanup (warnings; formatting) 2018-05-18 16:36:00 +03:00
Anna.Kozlova f407fb73c3 unknown class get all unresolved reference fixes (IDEA-192090) 2018-05-17 16:18:52 +02:00
Anna.Kozlova 99d01ccd8c don't make raw type equal to anything else (IDEA-192037) 2018-05-17 11:28:24 +02:00
Anna.Kozlova c4ada244b2 method refs: don't ignore applicability errors (IDEA-191467) 2018-05-17 11:28:24 +02:00
Anna.Kozlova 10e023e75e disable on-demand static import for non-static members (IDEA-191774) 2018-05-15 15:33:42 +02:00
Tagir Valeev b336e70485 Less smart simplifications after loop-to-stream (keep stream) 2018-05-13 18:10:54 +07:00
Tagir Valeev ca3f94d456 FoldExpressionIntoStream: support String.join-able patterns (IDEA-190570) 2018-05-11 16:25:05 +07:00
Tagir Valeev c55d9483b2 IntroduceVariableIntentionAction: stop at code block
To prevent escaping lambda/anonymous class
2018-05-10 13:26:15 +07:00
Tagir Valeev 0418d57ade Error is reported when qualified this is used to initialize a final variable
Fixes IDEA-191686 Bad code is green (cannot assign a value to final variable)
2018-05-10 13:03:40 +07:00
Tagir Valeev 4861c7cc17 RedundantStringOperation: refactored to CallMapper; indexOf/startsWith/lastIndexOf scenarios
Fixes IDEA-191536 More redundant string operations with indexOf lastIndexOf startsWith
2018-05-10 12:01:59 +07:00
Roman.Ivanov a9b2ba633f Create intention to change serialVersionUID: IDEA-25703 2018-05-08 11:59:36 +07:00
Roman.Ivanov 5147b0b394 Create intention to change serialVersionUID: IDEA-25703 2018-05-08 11:59:36 +07:00
Anna Kozlova 2702d8c729 redundant type args: provide context for copied enum constant (IDEA-191043) 2018-05-02 20:06:12 +02:00