#671 Missing null check on the return of Header.get() method

open
nobody
general (129)
5
2010-11-21
2010-11-21
Suresh
No

We developed a mining-based approach that recovers specifications for APIs of JavaSDK and uses those specifications to detect defects statically. In our study, we found that at various places, return checks are missing in the Columba. It would be great if you could analyze and fix those issues.

Missing null check on the return of org.columba.ristretto.message.Header,get(java.lang.String) method, which is invoked in the following methods:

Class: AddAllSendersToAddressbookCommand.java
Method: execute

Class: AddressbookFilter.java
Method: process

Class: AddSenderToAddressbookCommand.java
Method: execute

Class: CommandHelper.java
Method: retrieveAccountItem

Class: CreateFilterOnMessageCommand.java
Method: execute

Class: CreateVFolderOnMessageCommand.java
Method: execute

Class: HeaderfieldFilter.java
Method: process

Class: MacchiatoPlugin.java
Method: trainMessageAsSpam, trainMessageAsHam

Class: MessageComposer.java
Method: initHeader

Class: PrintMessageCommand.java
Method: execute

class: SaveMessageSourceAsCommand.java
Method: execute

Discussion