[ 
https://issues.apache.org/jira/browse/LUCENE-5506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931701#comment-13931701
 ] 

Furkan KAMACI commented on LUCENE-5506:
---------------------------------------

[~mikemccand] I've debugged the code and I see that optimize() method at 
Reduce.java has bug (I think so). Right now args[0] is not upper cased properly 
so optimize (removing the holes in the rows of the given trie) did not into 
take count. Because of optimize() method never runs the bug is not realized. If 
the bug is resolved stemmer may work faster. I will open a new Jira for it.

> 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, 5.0
>
>         Attachments: LUCENE-5506.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to