Eike Kettner created JSIEVE-94:
----------------------------------

             Summary: Nullpointer in SieveMailAdapter#post()
                 Key: JSIEVE-94
                 URL: https://issues.apache.org/jira/browse/JSIEVE-94
             Project: James jSieve
          Issue Type: Bug
          Components: JSieve (Main)
    Affects Versions: 0.5
            Reporter: Eike Kettner


I've got a NPE when using the reject action with a simple sieve script:

require ["reject"];

if header :matches "From" ["*john@*"] {
  reject "Don't want your mail.";
}

The class `SieveMailAdapter` implements the `post()` Method declared in 
`ActionContext`. The method's api doc says, that the `sender` argument may be 
null. In that respect the line 134 in `RejectAction` is ok, since it passes 
`null` to the `post()` method. The implementation of that method however, 
delegates this null argument to the `sendMail()` method of `MailetContext` 
(`JamesMailetContext` l.413). The api doc here does not tell whether null is 
allowed or not, but if sender is null, it would fail in 
`ToSenderFolder#doService()` (l.90). 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to