Dmitry Katsubo created MIME4J-276:

             Summary: Potential NPE in Fields.contentType(String mimeType, 
NameValuePair... parameters)
                 Key: MIME4J-276
             Project: James Mime4j
          Issue Type: Bug
          Components: dom
    Affects Versions: 0.8.2
            Reporter: Dmitry Katsubo

The code of this method reads:
public static ContentTypeField contentType(String mimeType, NameValuePair... 
parameters) {
    return contentType(mimeType, parameters != null || parameters.length == 0 ? 
Arrays.asList(parameters) : null);
Eclipse shows an error at location {{parameters.length == 0}} because at this 
place {{parameters}} can only be NULL. Perhaps the author ([~olegk]) meant this:
parameters == null || parameters.length == 0 ? null : Arrays.asList(parameters)

This message was sent by Atlassian JIRA

Reply via email to