Eric Olander - 2005-04-19

Here's a code fragment I see all too often:

        // Get the set of entries in the map.
        Set entrySet = callDataMap.entrySet();
        if (null != entrySet)
        {
            // Get the iterator for the entries.
            Iterator iterator = entrySet.iterator();
            if (null != iterator)
            {

If the coder bothered to look up the API, he'd realize that both of these null checks are unnecessary. Then the code would not be so clogged with nested if statements, cyclometic complexity would go down, and the world would be a better place. Until then, I just keep ripping this trash out.

-Eric