Commit Graph

1195 Commits

Author SHA1 Message Date
Tagir Valeev
e2d5de3528 ExpressionUtils#isEvaluatedAtCompileTime: fixed for casts to String (operand was not checked) 2018-01-24 14:36:20 +07:00
Tagir Valeev
d828baf6e3 LambdaAndExplicitMethodPair: Arrays.setAll -> Arrays.fill pair added
Allows to make IDEA-185394 in two steps
2018-01-24 13:37:55 +07:00
Alexey Kudravtsev
5f67dd2d84 quick fix to convert empty anonymous class to the plain new expression 2018-01-22 15:10:16 +03:00
Roman Ivanov
6dda38da0f SortContentAction: trying to save layout with multiple items on line 2018-01-22 15:57:22 +07:00
Tagir Valeev
1a40a9f877 RedundantCollectionOperation: warn on if(map.containsKey(x)) map.remove(x)
Review ID: IDEA-CR-28150
2018-01-22 13:39:09 +07:00
Tagir Valeev
c841cb3b44 IDEA-185167 Allow to convert automatically Optional.orElse(...) to Optional.orElseGet(() -> ...) 2018-01-19 15:07:21 +07:00
Tagir Valeev
b3b019e5b7 ExpressionUtils#isSimpleExpression: consider Collections.emptyXyz as simple (they are just static field getters) 2018-01-19 15:07:20 +07:00
Bas Leijdekkers
f2e6fca603 use CommentTracker.text() with precedence argument 2018-01-18 15:19:20 +01:00
Dmitry Batkovich
cc8d990786 redundant throws fix should remove javadoc tag too (IDEA-185105) 2018-01-18 15:05:24 +03:00
Tagir Valeev
44585d34d9 CommentTracker: support removal of reference qualifier; used in AddSingleMemberStaticImportAction 2018-01-18 12:00:24 +07:00
Anna.Kozlova
8ce7fac354 hide fixes which expose unresolved type parameters; add fixes for boxing
IDEA-150081
2018-01-12 18:53:17 +01:00
Tagir Valeev
30b3d4a558 IDEA-184825 "Redundant String operation" inspection - rename 'Delete element' to 'Delete argument' 2018-01-12 11:44:40 +07:00
Anna.Kozlova
d74021cd16 highlight enum with abstract methods until enum initializer is added
IDEA-184704
2018-01-11 19:31:43 +01:00
Anna Kozlova
8758030cf7 don't add make enum abstract fix (IDEA-184788) 2018-01-11 09:36:24 +01:00
Tagir Valeev
83c6c5222e IDEA-184240 Unnecessary array-to-collection wrapping should be detected 2018-01-11 13:51:16 +07:00
Anna.Kozlova
ee559693e0 add static import: don't suggest private inner by default (IDEA-158284) 2018-01-09 17:32:57 +01:00
Anna Kozlova
bd49d9f065 add static import: check all expected types (IDEA-153378) 2018-01-05 20:05:51 +01:00
peter
41d78cd086 IDEA-182501 Unwrap 'if' generates unreachable code 2018-01-03 21:47:57 +01:00
Anna Kozlova
2dd4d855fb compilation error fix: transform getClass()->.class (IDEA-117106) 2018-01-03 21:10:47 +01:00
Tagir Valeev
c78e018f81 DFA: ignore boolean fields initializer if it's true or false literal
Often it's used as a knob to switch program behavior, so it's reasonable to analyze both alternatives
2017-12-29 18:35:29 +07:00
Anna.Kozlova
a1239e3f1f preserve comments: replace switch with if (IDEA-113518) 2017-12-28 18:09:41 +01:00
Tagir Valeev
f1bc1f9819 OptionalIsPresentInspection: warn if map(x -> nullable).orElse(null)
In this case semantics preserved if map expression returns null.
2017-12-27 15:40:02 +07:00
Tagir Valeev
2e7492686e StringConcatenationInLoopsInspection: null-safe fixes
Fixes IDEA-183139 "String to StringBuilder" quick fix may cause NPE
2017-12-26 17:18:40 +07:00
Tagir Valeev
ede06bbf4b RedundantCollectionOperation: more tests (IDEA-CR-28150) 2017-12-25 17:50:25 +07:00
Tagir Valeev
4c568edfc9 RedundantCollectionOperation: remove by index and contains before add/remove
IDEA-182694 Inefficient uses of Collection/List.remove
2017-12-25 17:39:36 +07:00
Anna.Kozlova
bee978ba1e disable create local from usage in this/super calls (IDEA-184182) 2017-12-22 16:23:22 +01:00
Tagir Valeev
89ac7f414a IDEA-184154 Use Comparator combinator fix produces red code 2017-12-22 13:38:38 +07:00
Anna.Kozlova
b0c74e1ec8 redundant type args: copy expected type for top level calls(IDEA-184050) 2017-12-20 16:11:31 +01:00
Anna Kozlova
f6049bb1b1 access static via instance for calls on interface refs (IDEA-183919) 2017-12-18 15:30:14 +01:00
Anna.Kozlova
65d06951f4 remove redundant initializer: cope with field initializer side effects
EA-113714 - CCE: RemoveInitializerFix.lambda$sideEffectAwareRemove$
2017-12-14 18:45:49 +01:00
Anna.Kozlova
571b62d662 enable add import for inner classes (IDEA-183488) 2017-12-14 11:41:51 +01:00
Anna.Kozlova
0bc1e140a3 preserve comments: replace cast with var 2017-12-14 11:41:51 +01:00
Anna.Kozlova
4d4eefc1ab disable lambda -> method ref for qualified new expressions (IDEA-183613)
there is no place where qualifier can be added for constructor reference
2017-12-13 14:10:59 +01:00
Anna.Kozlova
bacdd1ada8 preserve comments: change new operator type 2017-12-07 15:51:06 +01:00
Pavel Dolgov
307a7c774c Java: Preserve comment from removed redundant variable (IDEA-182669) 2017-12-06 20:36:00 +03:00
Pavel Dolgov
971db5a4d6 Java: Simplify side effects check (IDEA-182669) 2017-12-06 19:08:44 +03:00
Tagir Valeev
ac8ad2c822 IDEA-183326 Comment disappears in stream to loop 2017-12-06 17:47:22 +07:00
Tagir Valeev
f03d494538 StringConcatenationInLoopsInspection: add null-check for unknown variables
IDEA-183139 "String to StringBuilder" quick fix may cause NPE
2017-12-06 11:57:10 +07:00
Pavel Dolgov
6bc79aa7ed Java: Use InlineUtil for removing redundant variable (IDEA-182669) 2017-12-05 16:15:51 +03:00
Tagir Valeev
9567645279 LambdaUtil#isSafeLambdaReplacement; used in ComparatorCombinators
Fixes IDEA-183048 stream replacing issue
2017-12-05 17:55:13 +07:00
Tagir Valeev
1f6fd39289 ComparatorCombinatorsInspection: fix chain extraction for incomplete code 2017-12-05 17:09:20 +07:00
Roman Ivanov
ac83fab673 SortContentAction: sort in bare array initializers :IDEA-183183 2017-12-05 16:19:43 +07:00
Tagir Valeev
ff3d49c50d UnrollLoopAction: comment handling fixed 2017-12-04 17:45:10 +07:00
Tagir Valeev
6746c6e1d1 StreamApiMigration: fixed exception when void expression is used as method argument 2017-12-04 17:40:01 +07:00
Anna.Kozlova
97535d8271 preserve comments: split declarations 2017-12-01 18:19:49 +01:00
peter
bf9a49d1be disable "create enum constant" when executing it would result in psi/text inconsistency 2017-11-30 17:34:24 +01:00
Anna.Kozlova
a683df3efd avoid search by offset in copy, use marker instead 2017-11-30 14:49:59 +01:00
Anna.Kozlova
7bccf6ebb2 preserve comments: merge sequential ifs 2017-11-29 12:12:54 +01:00
Anna.Kozlova
64364640a9 normalize declaration: don't include tree next after space 2017-11-29 12:12:54 +01:00
Pavel Dolgov
4ed027a1fe Java: Inline redundant returned variable after moving 'return' (IDEA-182669) 2017-11-29 12:59:41 +03:00