Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9413

String.replace Function result is ignored in lucene/analysis/kuromoji CSVUtil.quoteEscape

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.1
    • 6.2, 7.0
    • None
    • None

    Description

      Hello!

      Code in the method CSVUtil. quoteEscape

      CSVUtil.java
          if (result.indexOf('\"') >= 0) {
            result.replace("\"", ESCAPED_QUOTE);
          }
      

      ignores the return value of the String.replace method.

      Probably, is should be:

      CSVUtil.java
          if (result.indexOf('\"') >= 0) {
            result = result.replace("\"", ESCAPED_QUOTE);
          }
      

      This possible defect found by static code analyzer AppChecker

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cpoerschke Christine Poerschke
            AppChecker AppChecker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment