NPE in getFields call
---------------------

                 Key: MIME4J-28
                 URL: https://issues.apache.org/jira/browse/MIME4J-28
             Project: Mime4j
          Issue Type: Bug
    Affects Versions: 0.3
            Reporter: Ron Lissack
            Priority: Minor


getFields throws NPE if there are no fields present.
I suggest you add the check as below

public List getFields(String name) {
       List l = (List) fieldMap.get(name.toLowerCase());
       if (l != null && !l.isEmpty()) {
           return Collections.unmodifiableList(l);
      }
       return null
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to