Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1829

PlainTextExtractor returns an empty reader when encoding is unsupported

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Labels:
      None
    • Environment:
      Reproduced in Linux and Windows

      Description

      PlainTextExtractor is failing to index text files. Searching for content in text files is not coming back with results.

      On the extractText(InputStream stream, String type, String encoding) method, the encoding is coming in as an empty string, and it throws the java.io.UnsupportedEncodingException at line 40 ( return new InputStreamReader(stream, encoding); ).

      modifying the following statement fixes the problem:
      before: if (encoding != null) {
      after: if (encoding != null && !encoding.equals("")) {

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              trollswagen hector rovira
            • 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