Skip to content

Ignoring the Return Values Of Immutable Objects [LUCENE-5506] #6569

@asfimport

Description

@asfimport

I was checking the source code of Lucene and I realized that return values of immutable objects are ignored at CSVUtil.java and Compile.java as follows:

CSVUtil.java:

  /**
   * Quote and escape input value for CSV
   */
  public static String quoteEscape(String original) {
    String result = original;
    
    if (result.indexOf('\"') >= 0) {
      result.replace("\"", ESCAPED_QUOTE);
    }
    if(result.indexOf(COMMA) >= 0) {
      result = "\"" + result + "\"";
    }
    return result;
  }

Compile.java

    if (args.length < 1) {
      return;
    }

    args[0].toUpperCase(Locale.ROOT);

Migrated from LUCENE-5506 by Furkan Kamaci, 1 vote, updated May 09 2016
Attachments: LUCENE-5506.patch
Linked issues:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions