Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-515

MimeType.getDescription() often returns nothing when "tika-mimetypes.xml" has a useful description already available.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.8
    • mime
    • None
    • ALL

    Description

      The reader that reads the XML and builds MimeTypes seem to be hard coded to the read only a single element when another is often used to hold descriptions/comments..

      String COMMENT_TAG = "_comment";

      MimeTypesReader.readMimeType(Element element) throws MimeTypeException {
      if (nodeElement.getTagName().equals(COMMENT_TAG)) {
      type.setDescription(
      nodeElement.getFirstChild().getNodeValue());

      -xml sample #1-

      <mime-type type="application/msword">
      <alias type="application/vnd.ms-word"/>
      <comment>Microsoft Word Document</comment>

      notice "comment" not "_comment' element...

      Why not simply rename all "_comment" tags to _comment and update the constant and all will be well.

      Attachments

        Activity

          People

            chrismattmann Chris A. Mattmann
            mpokorny Miroslav Pokorny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified