Jaechang Nam created MIME4J-258:
-----------------------------------
Summary: A potential NPE
Key: MIME4J-258
URL: https://issues.apache.org/jira/browse/MIME4J-258
Project: James Mime4j
Issue Type: Bug
Components: dom
Reporter: Jaechang Nam
Priority: Trivial
In dom/src/main/java/org/apache/james/mime4j/field/Fields.java, the conditions
in return statement may cause NPE when 'parameters' is null. (found a current
github snapshot as of cb48082fb7cbbfb111c926cc8ae953d7261c235c)
{code}
157 public static ContentTypeField contentType(String mimeType,
NameValuePair... parameters) {
158 return contentType(mimeType, parameters != null ||
parameters.length == 0 ? Arrays.asList(parameters) : null);
159 }
{code}
Intended this?
{code}
158 return contentType(mimeType, parameters != null?
Arrays.asList(parameters) : null);
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)