Yeah, that abuse of assert always bugged me.

-- Adam


On 3/15/07, Simon Lessard <[EMAIL PROTECTED]> wrote:

Hello all,

I would like to get rid of the following code snippet from
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.RowData and
make that usage forbidden in our coding conventions wiki, as it's really a
poor man's #ifdef __DEBUG and goes against the idea of assert not having
any
performance overhaul at runtime.

    boolean assertEnabled = false;
    assert assertEnabled = true;

    ...
    if (assertEnabled)
    {
      // make sure prev operation was get:
      assert (_currentRowSpanState == 2);
      _currentRowSpanState = 0; // indicate that we have reset the rowspan
    }

Any objection?


~ Simon

Reply via email to