You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Simon Lessard (JIRA)" <ad...@incubator.apache.org> on 2007/03/16 03:09:09 UTC

[jira] Resolved: (ADFFACES-416) Remove usages of assert as a #ifdef C macro

     [ https://issues.apache.org/jira/browse/ADFFACES-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Lessard resolved ADFFACES-416.
------------------------------------

    Resolution: Fixed

Applied my patch to the trunk.

> Remove usages of assert as a #ifdef C macro
> -------------------------------------------
>
>                 Key: ADFFACES-416
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-416
>             Project: MyFaces ADF-Faces
>          Issue Type: Task
>          Components: Build
>    Affects Versions: 2.0.0-incubating-core-SNAPSHOT, 1.0.0-incubating-core-SNAPSHOT
>            Reporter: Simon Lessard
>         Assigned To: Simon Lessard
>            Priority: Trivial
>             Fix For: 2.0.0-incubating-core-SNAPSHOT, 1.0.0-incubating-core-SNAPSHOT
>
>         Attachments: ADFFACES-416.patch
>
>
> The idea behind Java assert is to have no overhaul at runtime when assert is disabled. However, since assert was introduced with Java 1.4, some abuses of it were found and the emulation of old C macros is one of them. However, that usage should be highly discouraged as it hit the performance (minimally, but it still hit it compared to the initial assert goal) and is relatively hard to read and maintain.
> Therefore, it should be forbidden to use assert as the following and existing usage should be removed :
> boolean debugEnabled = false;
> assert debugEnabled = true;
> // ...
> if(debugEnabled)
> {
>   // Do some debug processing
> }
> // ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.