Uploaded image for project: 'James Mime4j'
  1. James Mime4j
  2. MIME4J-258

A potential NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • dom
    • None

    Description

      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 from a current github mirror snapshot as of cb48082fb7cbbfb111c926cc8ae953d7261c235c)

      157     public static ContentTypeField contentType(String mimeType, NameValuePair... parameters) {
      158         return contentType(mimeType, parameters != null || parameters.length == 0 ? Arrays.asList(parameters) : null);
      159     }
      

      Intended this?

      158         return contentType(mimeType, parameters != null? Arrays.asList(parameters) : null);
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lifove JC
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: