Commit Graph

3653 Commits

Author SHA1 Message Date
Artemiy Sartakov
25643b9c89 PsiDocMethodOrFieldRef: fixed javadoc resolve for references without param types (IDEA-205390) 2019-01-16 12:45:09 +07:00
Tagir Valeev
cfd0c17038 IDEA-205308 'Replace with max()' produces uncompilable source 2019-01-15 13:14:19 +07:00
Tagir Valeev
a3ed07435e IDEA-205309 'Replace with findFirst()' produces uncompilable source 2019-01-15 12:32:12 +07:00
Tagir Valeev
c68df6edc2 ConvertSwitchToIfIntention: preserve comments from expression when only default branch is present 2019-01-10 17:24:20 +07:00
Tagir Valeev
0835bd0976 ConvertSwitchToIfIntention: fix processing of empty blocks
IDEA-205137 `Replace Switch with If` produce exceptions
IDEA-205122 Unwrap switch fails with exception
2019-01-10 12:40:04 +07:00
Anna.Kozlova
e0e26f5b95 fix remove redundant suppress from javadoc tag (IDEA-205073) 2019-01-08 16:16:05 +01:00
Anna.Kozlova
361f188984 highlighting of overriding methods: reorder warnings (IDEA-199315) 2019-01-07 19:09:18 +01:00
Anna.Kozlova
55820ccd15 predict functional type in assignment context (IDEA-199264) 2019-01-07 19:09:17 +01:00
Tagir Valeev
725cf20422 IDEA-204917 "Loop can be collapsed with Stream API" creates uncompilable results in some cases
1. Look for references inside IntStream.iterate condition (Java9+)
2. When simplifying IntStream.range(...).map(i -> arr[i]) check if arr expression don't refer to i
2019-01-06 10:25:15 +07:00
Anna.Kozlova
f105cd4e0c extract if: preserve comments inside redundant parenthesis 2019-01-04 11:00:05 +01:00
Anna.Kozlova
05027a22f6 light resolve tests when applicable 2019-01-02 16:35:41 +01:00
Anna.Kozlova
2e7f05efd0 advHighlighting -> light test case 2019-01-02 16:35:41 +01:00
Anna Kozlova
4d6dd142f0 fix testdata 2018-12-28 21:30:43 +01:00
Anna.Kozlova
b09a6328d4 change signature from usage: disable when permute arguments fix is available (IDEA-176975) 2018-12-28 19:08:45 +01:00
Dmitry Jemerov
f2f79946b1 Don't use title case in quickfix names (Assign parameter to field) 2018-12-28 16:42:12 +01:00
Anna.Kozlova
44b0ad8059 convert to light test case 2018-12-28 16:26:28 +01:00
Tagir Valeev
7addf9e702 IDEA-204717 Can't convert enhanced 'switch' to 'if' if a branch's body contains an end-of-line comment 2018-12-26 21:05:24 +07:00
Roman.Ivanov
ffea561fc3 ComparatorCombinatorsInspection: fix case, where inspection failed to recognize chain 2018-12-26 17:33:53 +07:00
Tagir Valeev
9fa4497ced IDEA-204701 Redundant collection operation: suggest emptyIterator() 2018-12-25 16:17:24 +07:00
Tagir Valeev
03e4f37774 ExpectedTypesProvider and CreateLocalFromUsageFix updated for Java 12 (IDEA-204006) 2018-12-21 16:32:43 +07:00
Tagir Valeev
92048254c1 VariableNameGenerator: fixed failing tests 2018-12-21 13:31:29 +07:00
Tagir Valeev
04f7352faa RemoveUnusedVariableUtil: code generation fixes
1. Support Java 12 switch rules and switch expressions (IDEA-203692)
2. Support void expression lambdas
3. Fix PSI structure when expression list statement is reduced to single expression
2018-12-20 13:50:01 +07:00
Tagir Valeev
362b8d0b34 Stream API migration: do not convert continue statements which belong to the nested loops (IDEA-204250) 2018-12-18 12:28:52 +07:00
Roman Shevchenko
6f7e4784f3 [java] value break ref inside switch expression always resolves to a variable (IDEA-204204)
... even when a switch expression is not an innermost context of the break
2018-12-17 18:49:16 +01:00
Anna.Kozlova
b4d7bd2bcf switch expression: missed error on continue without lbl outside of switch (IDEA-204208) 2018-12-13 18:01:51 +01:00
Anna.Kozlova
67422555d5 switch expression: fix typo in type calculation (IDEA-204188) 2018-12-13 18:01:51 +01:00
Tagir Valeev
5d4a0b8197 Basic support of switch expressions in StatementExtractor/SideEffectChecker
Fixes IDEA-204138 Exception in "statement with empty body" inspection with switch expression
Fixes EA-133610 - REWA: StatementExtractor.createNode
2018-12-13 17:42:28 +07:00
Daniil Ovchinnikov
0ebd593531 [java] static modifier of created method should depend on containing class (IDEA-203737) 2018-12-12 13:26:00 +03:00
Daniil Ovchinnikov
e110fd2ee7 [java] don't group "Create from usage" fixes in tests 2018-12-12 13:25:59 +03:00
Tagir Valeev
98347e5018 IDEA-203984 "Remove unreachable branches" quickfix breaks code on switch expression 2018-12-11 15:48:48 +07:00
Tagir Valeev
7e9e5dd691 IDEA-203845 com.intellij.util.IncorrectOperationException: Incorrect statement 'else 2018-12-08 17:14:46 +07:00
Tagir Valeev
244c7f0164 IDEA-203812 bad code green: switch expression does not have any case clauses 2018-12-08 16:56:57 +07:00
Anna.Kozlova
6692c339e1 switch expression: display dedicated error on target type void (IDEA-203776) 2018-12-07 20:13:41 +01:00
Anna.Kozlova
2b64f13de2 check enum synthetic method by erased signatures (IDEA-203732) 2018-12-07 19:41:05 +01:00
Tagir Valeev
3b61faf3d2 MoveFieldAssignmentToInitializer: misc fixes; support Java 12 (IDEA-203693) 2018-12-07 15:09:09 +07:00
Tagir Valeev
53b426dfae SwitchStatementWithTooFewBranches: warn on switch expression; provide fix in simple case (single default) 2018-12-07 12:53:08 +07:00
Dmitry Batkovich
b81af4a9d6 use inter-language modifier fix inside java analysis IDEA-202508 2018-12-07 08:34:41 +03:00
Tagir Valeev
bb990f4f13 ConvertSwitchToIfIntention: support Java 12 switch statements (no expressions) 2018-12-07 11:56:15 +07:00
Bas Leijdekkers
ba48ec7de0 IG: fix false negative with switch expression (IDEA-203709) 2018-12-06 13:02:00 +01:00
Roman Shevchenko
9d90b90f72 Cleanup (warnings/typos/duplicates/formatting) 2018-12-04 14:57:30 +01:00
Anna.Kozlova
3cd2baac99 switch expression: correct enhanced old-style result expression calculus
IDEA-CR-40239
2018-12-04 10:44:23 +01:00
Anna.Kozlova
569d069304 fix testdata 2018-12-03 15:27:44 +01:00
Anna.Kozlova
d2042376d2 overload resolution: erase type of parameter when site substitutor is raw (IDEA-203450)
similar to erasure of call type when inferred substitutor is raw
2018-12-03 15:21:12 +01:00
Anna.Kozlova
a9fe383ced anonymous -> lambda: stop on calls to j.l.Object methods of anonym classes (IDEA-203343) 2018-11-30 19:11:52 +01:00
Anna.Kozlova
9080b35751 switch expression: support old syntax without braces
IDEA-CR-40239
2018-11-30 16:28:02 +01:00
Tagir Valeev
0d96d61986 IDEA-203119 Unwrap switch statement: support expressions 2018-11-28 19:00:05 +07:00
Tagir Valeev
81c9810bde IDEA-203119 Unwrap switch statement: support rule-cases and multiple expression cases 2018-11-28 19:00:04 +07:00
Anna.Kozlova
ec5c0c4a60 variable already assigned: ensure second assignment is raised, simplification (IDEA-202897) 2018-11-27 16:23:53 +01:00
Tagir Valeev
67f783a00f SurroundWithRequireNonNull testdata fixed after precise nullability reporting 2018-11-27 17:30:20 +07:00
Tagir Valeev
01b72f856a DFA: branch-specific reporting (IDEA-203016) 2018-11-27 16:57:29 +07:00