You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org> on 2007/09/19 22:08:12 UTC
[jira] Closed: (MIME4J-28) NPE in getFields call
[ https://issues.apache.org/jira/browse/MIME4J-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin closed MIME4J-28.
---------------------------------------
Resolution: Fixed
Committed. Many thanks.
> 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
> Assignee: Robert Burrell Donkin
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org