void () { boolean oldValue = myInspection.reportWhenNoStatementFollow; myInspection.reportWhenNoStatementFollow = false; try { doTest(); } finally { myInspection.reportWhenNoStatementFollow = oldValue; } }