lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furkan KAMACI (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-5506) Ignoring the Return Values Of Immutable Objects
Date Sat, 08 Mar 2014 15:59:42 GMT
Furkan KAMACI created LUCENE-5506:
-------------------------------------

             Summary: Ignoring the Return Values Of Immutable Objects
                 Key: LUCENE-5506
                 URL: https://issues.apache.org/jira/browse/LUCENE-5506
             Project: Lucene - Core
          Issue Type: Bug
    Affects Versions: 4.6.1, 4.7
            Reporter: Furkan KAMACI
            Priority: Minor
             Fix For: 4.8


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*:
{code}

  /**
   * 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;
  }

{code}

*Compile.java*
{code}
    if (args.length < 1) {
      return;
    }

    args[0].toUpperCase(Locale.ROOT);
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message