[ https://issues.apache.org/jira/browse/LUCENE-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735275#action_12735275 ]
Uwe Schindler edited comment on LUCENE-1762 at 7/25/09 7:01 AM: ---------------------------------------------------------------- As Token is not yet deprecated, I think, this patch should also apply to Token.java? Can you prepare that, too? (This is important, because if the backwards-compatibility layer is enabled with setOnlyUseNewAPI(false)), the TermAttributeImpl is never used and a Token instance is used instead - if no tests fail, this may also be the case :-] ) was (Author: thetaphi): As Token is not yet deprecated, I think, this patch should also apply to Token.java? Can you prepare that, too? > Slightly more readable code in TermAttributeImpl > ------------------------------------------------- > > Key: LUCENE-1762 > URL: https://issues.apache.org/jira/browse/LUCENE-1762 > Project: Lucene - Java > Issue Type: Improvement > Components: Analysis > Reporter: Eks Dev > Assignee: Uwe Schindler > Priority: Trivial > Attachments: LUCENE-1762.patch > > > No big deal. > growTermBuffer(int newSize) was using correct, but slightly hard to follow > code. > the method was returning null as a hint that the current termBuffer has > enough space to the upstream code or reallocated buffer. > this patch simplifies logic making this method to only reallocate buffer, > nothing more. > It reduces number of if(null) checks in a few methods and reduces amount of > code. > all tests pass. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org