incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Getting rid of an ugly assert usage
Date Fri, 16 Mar 2007 01:25:26 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message