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.

Reply via email to