Commit Graph

14 Commits

Author SHA1 Message Date
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
Tagir Valeev 55466aeef1 IDEA-169678 "Replace Optional.isPresent() condition with functional style expression" breaks code in case of 'Collection' return type 2017-03-16 11:22:15 +07:00
Tagir Valeev f396483457 Fixed EA-96417 - IOE: PsiJavaParserFacadeImpl.createExpressionFromText 2017-02-08 18:16:37 +07:00
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