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

Configuration parser fails in Java 1.4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.2
    • 0.3
    • config
    • None

    Description

      As reported by Dmitry Kudryavtsev on the mailing list, the TikaConfig class does not work on Java 1.4 even in the retrotranslated -jdk14 version.

      Dmitry explains:
      > I would like to suggest a minor patch for TikaConfig for backward
      > compatibilities with java 1.4
      > Here it is:
      > ===>
      > ...
      > parsers.put(mime.getTextContent().trim(), parser);
      > ...
      > <===
      >
      > in constructor TikaConfig(Element element) should be replaced with code
      > like:
      >
      > ===>
      > Node txtNode = mime.getFirstChild();
      > if ( txtNode != null )

      { > parsers.put(txtNode.getNodeValue().trim(), parser); > }

      > <===
      >
      > This is important because Node.getTextContent not available in java 1.4 and
      > tika-jdk1.4 become useless.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: