Suppress inspections on assertions helper

This commit adds comments to org.elasticsearch.Assertions that disables
IntelliJ from complaining about using assert with side-effects, and
using constant conditions there as the side-effect with a constant
condition is intentionally employed.
This commit is contained in:
Jason Tedor 2017-05-23 09:34:51 -04:00
parent a85c1bcede
commit 6ec485d30d
1 changed files with 2 additions and 0 deletions

View File

@ -38,7 +38,9 @@ public final class Assertions {
* If assertions are enabled, the following line will be evaluated and enabled will have the value true, otherwise when assertions * If assertions are enabled, the following line will be evaluated and enabled will have the value true, otherwise when assertions
* are disabled enabled will have the value false. * are disabled enabled will have the value false.
*/ */
// noinspection ConstantConditions,AssertWithSideEffects
assert enabled = true; assert enabled = true;
// noinspection ConstantConditions
ENABLED = enabled; ENABLED = enabled;
} }