Tagir Valeev
4985d21958
[java-inspections] Support "!null -> param1" contract (like in Objects.requireNonNullElse/requireNonNullElseGet)
...
Part of IDEA-291513 "Constant conditions & exceptions" does not flag 'Objects.requireNonNullElse'
GitOrigin-RevId: 0cfd983801e8ed08f6407145215f7f9c6b12a684
2022-04-05 12:01:37 +00:00
Tagir Valeev
4db99cd17a
ObviousNullCheck: exclude constructors
2019-01-04 16:23:48 +07:00
Tagir Valeev
a35e4128e6
IDEA-197026 "Redundant null-check" inspection: make a quick-fix to replace "foo != null" with "foo"
...
Primitive type name is added to the message
2018-08-17 15:16:11 +07:00
Tagir Valeev
2da61d9a9b
ObviousNullCheck: defer resolve; isVoidContext
2018-07-04 13:23:36 +07:00
Tagir Valeev
5f86f8cb46
ExpressionUtils#isArrayCreationExpression; used in SideEffectChecker
...
Fixes IDEA-194652 IDEA found side effect in primitive array creation
2018-06-28 17:53:29 +07:00
Tagir Valeev
20b6cba1d5
"Useless" word is replaced with "redundant" or other alternatives
2018-06-22 12:39:20 +07:00
Tagir Valeev
4620b945f8
ObviousNullCheck: use more abstract MethodContract; support contracts like "null -> fail; !null -> paramX"
2018-05-04 17:44:28 +07:00
Tagir Valeev
38d7f010f4
ObviousNullCheck: warn for "this" expression
2018-01-16 14:04:18 +07:00
Tagir Valeev
9301835979
ObviousNullCheckInspection: support assertNull-like methods
...
Fixes IDEA-174782 "Useless null checks": highlight always-(not-)null arguments to assertNull/assertNotNull
2017-06-27 08:25:19 +03:00
Tagir Valeev
f7a43a77ff
ObviousNullCheckInspection: improve extraction of side-effect statements when ternary operator or short-circuiting logic is involved.
2017-05-18 16:47:19 +07:00
Tagir Valeev
887708387d
Objects.requireNonNull is not pure as it executes the passed lambda
2017-05-15 17:02:44 +07:00
Tagir Valeev
67e97bc713
ObviousNullCheckInspection: ignore null literals
2017-05-15 15:11:38 +07:00
Tagir Valeev
b3339b7cfd
IDEA-165108 Objects.requireNonNull with argument of primitive type should be reported as warning
2017-05-15 13:08:30 +07:00