Commit Graph

11 Commits

Author SHA1 Message Date
Tagir Valeev 3741495801 LambdaGenerationUtil: disable if expression is accessed for writing
Fixes IDEA-165482 Optional.isPresent suggests to replace the code which assigns the variable defined outside
2016-12-15 11:51:58 +07:00
Tagir Valeev dddfd5d7b6 LambdaGenerationUtil#canBeUncheckedLambda: supports statements; checks control-flow breaks;
Fix for IDEA-165369 Replace Optional.isPresent() should be disabled if the thenBranch contains non-local control flow
2016-12-14 15:44:59 +07:00
Tagir Valeev 0f7c78a5a6 IDEA-163991 ifPresent is not suggested when value is not used inside expression; OptionalIsPresentInspection uses CommentTracker now 2016-11-23 17:26:57 +07:00
Tagir Valeev 3fa339e3dd IDEA-164016 Replace Optional.isPresent() checks with functional-style expressions fix produces non-compilable code 2016-11-21 14:47:02 +07:00
Tagir Valeev 0fa3853dfb IDEA-163767: fixed for assignment, tests for assignment and ternary 2016-11-11 13:24:09 +07:00
Tagir Valeev 1d74e0af9d IDEA-163767 Simplify optional.isPresent() inspection doesn't suggest simplify trivial case 2016-11-11 13:14:55 +07:00
Tagir Valeev 7e574d661c IDEA-163764 "Replace Optional.isPresent() checks with functional-style expressions" create uncompilable code
IDEA-163463 Stream API migration: type argument before map appears sometimes when it's unnecessary
2016-11-11 11:28:44 +07:00
Tagir Valeev 21564bba7b IDEA-163627 Simplify optional.isPresent() inspection could better handle some specific cases
IDEA-163462 Simplify Optional.isPresent() ? Optional.get() : ...
2016-11-07 17:23:00 +07:00
Tagir Valeev 355973cb56 IDEA-CR-13980: comments handling is simplified (they just extracted and placed before the condition) 2016-09-30 16:32:25 +07:00
Tagir Valeev 7e72d2fe9e OptionalIsPresentInspection: simplify isRaw() and isOptionalLambdaCandidate(); fix getComments(); add more tests (IDEA-CR-13980) 2016-09-27 12:01:07 +07:00
Tagir Valeev aadd111eda IDEA-161420 Quick-fix to replace if(optional.isPresent()) with better alternatives 2016-09-21 15:41:20 +07:00