new inspection: reachabilityFence() shouldn't be called with complex expression

GitOrigin-RevId: 6c93e1b053115babbe6b2590d0168edaa599dd8d
This commit is contained in:
Alexey Kudravtsev
2021-03-18 03:25:09 +01:00
committed by intellij-monorepo-bot
parent e8bf634369
commit f20e941cb2

View File

@@ -1358,6 +1358,10 @@
<constraint name="psiElement" nameOfExprType="com\.intellij\.psi\.PsiElement" exprTypeWithinHierarchy="true" within="" contains="" />
<constraint name="__context__" within="" contains="" />
</replaceConfiguration>
<searchConfiguration name="reachabilityFence() shouldn't be called with complex expression" description="Only local variable references and &quot;this&quot; should be passed to reachabilityFence() method. &#10;Passing complex expression which calculate/create some object doesn't make sense &#10;because avoiding garbage-collecting this object is trivial when the object is just created. " problemDescriptor="Only locals/'this' should be passed to reachabilityFence()" text="reachabilityFence($k$);" recursive="false" caseInsensitive="false" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="k" regexp="\w+" negateName="true" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="remove test-only branch and use UIUtil.dispatchAllInvocationEvents() in tests" uuid="07f04ba3-90ed-3e4d-9f88-e45dfaa05771" text="if ($APP$.isUnitTestMode()) {&#10; $DO$;&#10;} else {&#10; $APP2$.$INV$($ARGS$);&#10;}" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="APP" within="" contains="" />