Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-2590

javax.activation.MimetypesFileTypeMap#addMimeTypes() not implemented correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • specs-2.6.0
    • specs
    • None
    • All

    Description

      According to http://docs.oracle.com/javase/7/docs/api/javax/activation/MimetypesFileTypeMap.html#addMimeTypes%28java.lang.String%29, the mime_type parameter is "a mine.types formatted string of entries". Note the plural entries. This is consistent with the behavior of the Oracle implementation.

      The servicemix implementation of this method incorrectly treats the parameter as a single mime.types entry. If a string containing multiple, new-line delimited, entries is passed then only the first entry is added.

      This means that code written to conform to the Oracle documentation/behavior, which passes multiple mime.types entries to this method, will fail when using the servicemix implementation of this class.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            chuckd@us.ibm.com Chuck Dumont
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: