// 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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's a code fragment I see all too often:
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