Commit Graph

1045 Commits

Author SHA1 Message Date
Anna.Kozlova dc7edd84fa copy to final: ensure to walk up through nested lambdas (IDEA-177496) 2017-08-16 15:35:15 +02:00
Tagir Valeev b1d286f8f6 IDEA-177515 Optional.isPresent() refactoring should not be suggested for ternary with incompatible branch types 2017-08-14 17:51:24 +07:00
Dmitry Batkovich 7fb26c249d redundant throws: filter out unchecked exception (IDEA-177478, IDEA-177506) 2017-08-14 10:47:25 +03:00
Tagir Valeev 1e9f078fa4 Quick-fix for NPE in method reference to convert to lambda and add ?: (IDEA-176699) 2017-08-11 11:17:57 +07:00
Anna.Kozlova 3d1ba95725 unhandled exception: shrink the highlighted range (IDEA-177234) 2017-08-09 18:38:29 +02:00
Dmitry Batkovich c4f2ca674c AddMissingRequiredAnnotationParametersFix: handle nameless parameter as value (EA-105427) 2017-08-09 12:48:39 +03:00
Dmitry Batkovich 52cf50c461 redundant throws inspection:
1. global and local inspections are merged to one
2. local inspection reports "non-final" methods (if cheap enough) IDEA-177230
2017-08-09 12:14:26 +03:00
Anna.Kozlova 6d1f106889 support Rename Reference on invalid method call (IDEA-176918) 2017-08-08 17:42:39 +02:00
peter 4dc12ddb60 update AnnotateMethodTest data 2017-08-08 16:41:09 +02:00
Anna.Kozlova f67eaef468 trivial functional expression fix for empty lambda code block 2017-08-08 13:28:41 +02:00
Tagir Valeev a454ab1c33 Quick-fix to insert .filter(Objects::nonNull) (IDEA-176699) 2017-08-08 12:14:36 +07:00
Anna.Kozlova fe61fc50e0 extend trivial method reference to support lambdas, convertible to method references 2017-08-07 16:00:10 +02:00
Anna Kozlova ba81ad7cd1 NPE (IDEA-176934) 2017-08-07 08:12:25 +02:00
Anna Kozlova 873df28d36 anonym -> lambda: disable for strictfp 2017-08-07 06:37:45 +02:00
Dmitry Batkovich ca93a04a0a simplify AnnotateMethodFix 2017-08-03 15:42:34 +03:00
Roman Ivanov 1003727653 Merge remote-tracking branch 'origin/master' 2017-08-02 13:11:56 +07:00
Roman Ivanov 72bab18a58 support min/max in stream api migration, rearrange tests 2017-08-02 12:57:45 +07:00
Tagir Valeev eaec99dcce DataFlowInspection: npe fixes fixed
Fixes duplicating NPE expression are disabled when expression has side-effect (not when it's a method call)
Parentheses added to generated code when necessary
2017-07-27 19:06:34 +07:00
Tagir Valeev 4882d4a589 IDEA-176650 Provide a quick fix of "can produce NPE" that wraps qualifier with Obejcts.requireNonNull 2017-07-27 18:48:43 +07:00
peter 99dec77a5a disable "insert new" fix on invalid code 2017-07-25 13:15:10 +02:00
Bas Leijdekkers 8d6551408c fix ControlFlowUtil.canCompleteNormally() regression (IDEA-141259) 2017-07-24 19:34:17 +02:00
Bas Leijdekkers aa515b08a1 generate "constant".equals(variable) code when converting switch to if (IDEA-157516) 2017-07-24 19:34:16 +02:00
peter 6c171f8e54 fix yet another PSI internals exception while updating "add on demand static import" intention 2017-07-22 08:08:18 +02:00
Tagir Valeev 926a541520 Test and comment for IDEA-176340 "Optional.isPresent not highlighted"
Actually was fixed in 0234c70
2017-07-21 17:13:52 +07:00
Bas Leijdekkers f5fdb50da7 Insert casted declaration in a nice place without exceptions (IDEA-176211) 2017-07-20 20:14:11 +02:00
Roman Ivanov dd4ba58889 add support for binary operation reduction in stream migration 2017-07-20 17:15:07 +07:00
Anna.Kozlova 01e64268f9 ensure method, imported statically, is not hidden by a local one (IDEA-175967) 2017-07-18 14:32:41 +02:00
Tagir Valeev 5c33eecb2e TrivialFunctionalExpressionUsage bugfixes & refactoring
Fixes IDEA-176019 Trivial functional expression: do not inline if parameter produces side effect and evaluated not once
Fixes EA-103938 (invalid PSI was used if inlining replaced the whole method)
Fixes inlining of functional expression
2017-07-18 17:39:34 +07:00
peter 82ae0d4e0b disable "add on demand static import" on invalid code 2017-07-17 15:50:33 +02:00
peter 90276fd30c disable "move initializer to" fixes on malformed fields 2017-07-13 17:58:13 +02:00
Dmitry Batkovich ff0ef41196 remove unused test data 2017-07-13 15:24:22 +03:00
Roman Shevchenko fb604512ea Merge remote-tracking branch 'origin/master' 2017-07-13 14:07:59 +02:00
Roman Shevchenko 7b9eab1dec [java] consistent PSI after removing one of multiple declarations (IDEA-175642) 2017-07-13 14:07:11 +02:00
Dmitry Batkovich 4e8024e4b4 qualify static const/method: static members from default packages should be visible for call inside default package 2017-07-13 13:56:46 +03:00
Roman Shevchenko ac8b9ae4ee Cleanup (formatting) 2017-07-13 12:55:25 +02:00
Roman Shevchenko dcbcfe3eb9 Cleanup (formatting) 2017-07-12 19:33:18 +02:00
peter 365d521519 IDEA-175018 Unwrap if produces red code 2017-07-07 17:53:00 +02:00
Anna.Kozlova 006b9b1742 split declaration: detect same variables after declaration (IDEA-175261) 2017-07-04 10:30:37 +02:00
Anna.Kozlova 1f82ff1a9e testdata for IDEA-159545 2017-06-30 18:07:25 +02:00
Alexey Kudravtsev 8037bdbfd1 annotate method if asked even it's (implicitly) inferred as NotNull 2017-06-29 15:55:13 +03:00
Anna Kozlova eb5c7ecb20 side effects in for stmt declaration (IDEA-172700)
transformation should be added before for stmt
2017-06-28 16:10:43 +02:00
Tagir Valeev cdce28fae8 MoveFieldAssignmentToInitializer: disable for self-references
Fixes IDEA-174956 "Move assignment to field declaration" produces red code
2017-06-28 10:34:33 +03:00
Tagir Valeev 9643e2d238 DeleteSideEffectsAwareFix: singular/plural message merged
Review: IDEA-CR-21623
2017-06-28 10:07:18 +03:00
Anna Kozlova 339c14cd12 disable split into decl 7/ assignment for conflicting names (IDEA-173787)
for statement induces another declaration parent where another local variable could have been declared
2017-06-26 18:07:01 +03:00
Anna Kozlova 67819c1e1f disable move initializer to constructor for final fields with usages in initializers (IDEA-174973) 2017-06-26 16:14:34 +03:00
Anna Kozlova 4311ffcd29 add on demand static import: proceed with type arguments (IDEA-174965)
otherwise unused imports could be inserted and the references won't be collapsed inside <>
2017-06-26 16:11:56 +03:00
Anna Kozlova ed4a26a905 add single static import: ensure not available when conflict(IDEA-174983)
when methods (> 1) with same name exist in the containing class
2017-06-26 16:11:56 +03:00
Pavel Dolgov 0aa8430cb4 Java: Look for redundant assignment of a field in class and field initializers (IDEA-149587) 2017-06-21 14:45:30 +03:00
yarik ced545552a [java formatter] c style comments formatting supported. Note, only single line comments or comments with each line starting with asterisks will be formatted, since by using /* and */ you 2017-06-20 14:48:26 +03:00
Anna Kozlova b6482f44a1 add static import: use existing import name (IDEA-174647) 2017-06-20 11:32:03 +03:00