Commit Graph

1363 Commits

Author SHA1 Message Date
Tagir Valeev
52053135e8 LambdaCanBeMethodReferenceInspection: support parenthesized call arguments 2018-07-05 13:25:33 +07:00
Tagir Valeev
5fc5a86cdf ConstantExpressionInspection: make it working inside parentheses 2018-07-05 13:25:29 +07:00
Tagir Valeev
ee8d7915e8 SimplifyBooleanExpressionAction: do not warn on x = (true) 2018-07-05 13:25:28 +07:00
Bas Leijdekkers
3cc8a26e39 allow to split var declaration if it has denotable type 2018-07-04 15:56:52 +02:00
Dmitry Batkovich
e34c1fed9e local redundant throws should respect exception subclasses when checking inherited method exceptions (add test) 2018-07-02 18:44:15 +03:00
Tagir Valeev
e616b88fa7 IDEA-194396 Merge StringConstructorInspection into RedundantStringOperationInspection 2018-07-02 17:50:00 +07:00
Anna Kozlova
a6db339c7d convert switch -> if: ignore whitespaces (IDEA-165260) 2018-06-29 20:20:36 +03:00
Tagir Valeev
04df6bad09 ConstantConditionalExpressionInspection: add cast if necessary when type changes
Fixes IDEA-194648 Simpler expression auto-fix results in different code
2018-06-29 15:37:46 +07:00
Anna Kozlova
d0ad282d01 enable add initializer on variable declaration (IDEA-194742) 2018-06-28 16:58:46 +03:00
Roman.Ivanov
32d2e5d36c CreateTypeParameterFromUsage: do not suggest fix in new expr IDEA-194610 2018-06-28 15:15:15 +07:00
Anna Kozlova
1c8d7cc8b0 disable 'fix all' in file for unused symbols inspection (IDEA-194627) 2018-06-28 11:12:17 +03:00
Tagir Valeev
bd4a3477f5 StreamApiMigration: register comments from post-loop operations like sorting 2018-06-27 09:29:38 +07:00
Anna Kozlova
2e22f09d37 allow to create inner class on qualifier (IDEA-129663) 2018-06-26 18:42:24 +03:00
Tagir Valeev
49a1e9e78a afterCommentInBlock: space restored (IDEA-CR-34134) 2018-06-26 15:46:35 +07:00
Anna Kozlova
002134fe5b disable constructor matching super when appropriate candidate already present
IDEA-113427
2018-06-26 09:18:42 +03:00
Anna Kozlova
e2e3359a09 keep comments on split declaration inside for loop 2018-06-26 09:18:41 +03:00
Anna Kozlova
8a3e53d414 testdata for IDEA-84211 2018-06-26 09:18:41 +03:00
Tagir Valeev
1a38128af4 StreamToLoop: do not trim trailing whitespace for block lambdas
Fixes trailing line comment handling
2018-06-26 12:36:58 +07:00
Roman.Ivanov
e63c06d315 SortContentAction: fix \n placement after eol comment : IDEA-194501 2018-06-26 12:04:00 +07:00
Roman.Ivanov
5076e08145 set SPACE_BEFORE_COLON_IN_FOREACH true by default, fix tests 2018-06-26 12:04:00 +07:00
Anna Kozlova
c318eb788b var -> explicit: don't register warnings twice
IDEA-CR-34042
2018-06-25 16:28:59 +03:00
Anna Kozlova
810a23812f disable surroundWith fix for var typed locals with non-denotable inferred types
IDEA-CR-33936
2018-06-25 16:28:59 +03:00
Roman Shevchenko
002f0ea6c3 Cleanup (test data formatting) 2018-06-25 14:44:25 +03:00
Roman.Ivanov
9d02d556ef SortContentAction: add test for leading comments : IDEA-194456 2018-06-23 09:57:00 +07:00
Anna Kozlova
17095a1640 var -> explicit: fix lambdas with multiple parameters (IDEA-194414) 2018-06-22 18:15:50 +03:00
Roman.Ivanov
d52470d415 SortContentAction: preserve comments in enums before first element 2018-06-22 15:45:12 +07:00
Anna Kozlova
18c575a41d folded functional expression: compare unprocessed types (IDEA-194333) 2018-06-21 13:50:18 +03:00
Tagir Valeev
dde103758e IDEA-194142 IDEA should recognize min/max usage with reversed order 2018-06-21 17:02:27 +07:00
Roman.Ivanov
19bfb9be67 SortContentAction: prevent sorting when enum entries have dependencies 2018-06-21 11:55:22 +07:00
Anna Kozlova
1a5768f1cd surround with try/catch: replace var with explicit type (IDEA-191069)
when declaration has to be split
2018-06-20 14:49:51 +03:00
Anna Kozlova
681bfe7ba6 enable explicit type -> var for diamonds (IDEA-188771)
expand diamonds and spare on explicit type declaration
2018-06-19 15:50:48 +03:00
Tagir Valeev
ecb2f6c1cf Add "Replace 'compute' with 'computeIfPresent'" fix
Helps for IDEA-194058 False-positive warning of producing NullPointerException for Map.compute
2018-06-19 15:07:31 +07:00
Anna Kozlova
876dd36dd9 use boxed type instead of expected primitive when NULL type is calculated
this allows int -> Integer signature changes when null is passed where primitive is expected (IDEA-164942)
2018-06-18 19:48:12 +03:00
Anna Kozlova
f6853fecd7 disable wrap with Integer.parseInt for null type (IDEA-164942) 2018-06-18 19:48:11 +03:00
Anna Kozlova
6adc33ee16 make create local from fix available on full range (IDEA-141875) 2018-06-18 17:05:41 +03:00
Tagir Valeev
048abf37d7 DivideByZeroInspection: add fix for 0.0/0.0 (replace with NaN)
Fixes IDEA-117884 Inspection "Divide by zero": Recognize 0.0/0.0
2018-06-18 16:36:10 +07:00
Roman Shevchenko
0e8c2770a0 Cleanup (test data formatting) 2018-06-15 12:21:39 +03:00
Anna Kozlova
90489c7c58 add javadoc for type parameter: insert brackets (IDEA-193915) 2018-06-14 17:54:17 +03:00
Anna Kozlova
1e7e741009 keep annotations for explicit to var fixes (IDEA-193876) 2018-06-14 12:10:52 +03:00
Tagir Valeev
79ed1b2dc3 shortenClassReferences: dequalify references which are statically imported 2018-06-14 10:08:16 +07: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
Rustam Vishnyakov
e9d34426d0 Test data fix 2018-06-06 15:44:16 +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