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:05:12 UTC

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

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


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.


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

Posted by "Simon Lessard (JIRA)" <ad...@incubator.apache.org>.
     [ 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.


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

Posted by "Simon Lessard (JIRA)" <ad...@incubator.apache.org>.
     [ 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.


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

Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/ADFFACES-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf updated ADFFACES-416:
----------------------------------------

          Component/s:     (was: Build)
                       Components
        Fix Version/s:     (was: 1.0.0-incubating-core)
                       1.0.1-incubating-core-SNAPSHOT
    Affects Version/s:     (was: 1.0.0-incubating-core)
                       1.0.1-incubating-core-SNAPSHOT

> 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: Components
>    Affects Versions: 2.0.0-incubating-core-SNAPSHOT, 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Simon Lessard
>         Assigned To: Simon Lessard
>            Priority: Trivial
>             Fix For: 2.0.0-incubating-core-SNAPSHOT, 1.0.1-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.