Commit Graph

1021 Commits

Author SHA1 Message Date
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
Anna Kozlova f60676d110 default Optional.empty for Optional type (IDEA-174268) 2017-06-14 19:27:02 +03:00
Anna Kozlova 3dff91600a redundant code block: compare same overload resolution (IDEA-174288)
instead of trying with cast afterwards, don't suggest to remove the block at the first place
2017-06-14 11:51:52 +03:00
Tagir Valeev fb6965b6b9 ExtractSideEffectsFix -> DeleteSideEffectsAwareFix; i18n
Now intention availability logic is moved from HighlightUtil to DeleteSideEffectsAwareFix
Review: IDEA-CR-21623
2017-06-08 12:15:20 +07:00
Tagir Valeev a5dcf8841f ComparatorResultComparisonInspection: support >/>=/</<= checks
Additional fix for IDEA-173177. Now conditions like "a.compareTo(b) > 1" are warned as well.
2017-06-08 10:14:34 +07:00
Tagir Valeev 535c113dba IDEA-172877 Provide a quick-fix on 'Not a statement' error message 2017-06-07 15:27:49 +07:00
Anna Kozlova 02c718aae8 replace assignment with comparison in condition exps (IDEA-173860) 2017-06-06 19:07:58 +03:00
Anna Kozlova 6487bb6913 disable assign parameter to final field (IDEA-173815)
for constructors with chaining calls, for non-constructors
2017-06-06 14:54:06 +03:00
Tagir Valeev dbcddf5a4a BoxForComparisonInspection enhanced -> UseCompareMethodInspection
Suggests to use Integer.compare(), etc. instead if ternary operator or if chain. Fixes IDEA-173766.
2017-06-06 17:20:08 +07:00
Anna Kozlova c578a4ede7 disable assign param to field (IDEA-173747; IDEA-173689)
inapplicable types or already assigned
2017-06-05 20:14:45 +03:00
Anna Kozlova 6423538939 surround with array fix: disable for non-denotable types (IDEA-173797) 2017-06-05 17:45:46 +03:00
Pavel Dolgov 6ebd6d9b4d Java: Fixed conversion of constructor parameters for java.awt.Color (IDEA-172996) 2017-06-01 13:30:14 +03:00
Tagir Valeev 588d978362 OptionalIsPresentInspection: do not warn if map() part can be null
If we cannot determine the non-nullity of map expression, then info
level is used. Fixes IDEA-172609 "Replace Optional.isPresent() checks
with functional-style expressions" is broken.
2017-05-31 17:48:57 +07:00
Anna Kozlova 3f76ffa2f8 provide quick fix to qualify super call to default interface method from class (IDEA-172325) 2017-05-30 15:00:42 +03:00
Tagir Valeev b209ade15d TrivialFunctionalExpressionUsageInspection: disable for multi-statement lambda in "for" init/update 2017-05-29 12:19:05 +07:00
Anna Kozlova 5e77c443de simplification following IDEA-CR-21392 2017-05-26 13:36:45 +03:00
Anna Kozlova 770ebf45af disable trivial functional expression for body with returns (IDEA-173436) 2017-05-25 16:06:05 +03:00
Tagir Valeev 3fda127a48 ComparatorResultComparisonInspection: renamed to "Suspicious usage of compare method" 2017-05-24 18:14:30 +07:00
Tagir Valeev 1db8b83dff IDEA-173177 Inspection: Comparing 'compareTo()` or 'Comparator.compare()' result with 1 / -1 2017-05-24 14:14:16 +07:00
Pavel Dolgov 16b1765f7f Java: Better handling of unreachable code (IDEA-172642) 2017-05-23 12:28:44 +03:00
Anna Kozlova e747d52bf5 create method from usage: treat polyadic expressions as for completion by containing expression (IDEA-151432) 2017-05-18 13:25:30 +03:00
Anna Kozlova 987caaf26d provide this(); fix when constructor requires super call (IDEA-151335) 2017-05-18 10:50:55 +03:00
Anna Kozlova 40cbf4648a fix testdata 2017-05-18 10:50:55 +03:00
Tagir Valeev f2442e32fa ConvertSwitchToIfTest: test5 rewritten as getClass() is now pure 2017-05-18 14:36:52 +07:00
Tagir Valeev 8323d2f78d BulkMethodInfo: support for Java 1.4 (fixes EA-101278). 2017-05-17 11:54:09 +07:00