Skip to content

Commit

Permalink
Suppress inspections on assertions helper
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasontedor committed May 23, 2017
1 parent a85c1bc commit 6ec485d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/elasticsearch/Assertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private 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.
*/
// noinspection ConstantConditions,AssertWithSideEffects
assert enabled = true;
// noinspection ConstantConditions
ENABLED = enabled;
}

Expand Down

0 comments on commit 6ec485d

Please sign in to comment.