incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard (JIRA)" <adffaces-iss...@incubator.apache.org>
Subject [jira] Updated: (ADFFACES-416) Remove usages of assert as a #ifdef C macro
Date Fri, 16 Mar 2007 03:07:09 GMT

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

Simon Lessard updated ADFFACES-416:
-----------------------------------

    Attachment: ADFFACES-416.patch

This patch removes the existing usages of assert as a macro in Trinidad.

> 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.


Mime
View raw message