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

Configuration parser fails in Java 1.4

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: config
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: