You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2009/07/29 21:16:14 UTC

[jira] Closed: (LUCENE-1762) Slightly more readable code in Token/TermAttributeImpl

     [ https://issues.apache.org/jira/browse/LUCENE-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler closed LUCENE-1762.
---------------------------------

    Resolution: Fixed

Committed revision: 799025
This is without CHANGES.txt updates, because nothing was changed that is visible to the outside :-)

Thanks Eks!

> Slightly more readable code in Token/TermAttributeImpl
> ------------------------------------------------------
>
>                 Key: LUCENE-1762
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1762
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>    Affects Versions: 2.9
>            Reporter: Eks Dev
>            Assignee: Uwe Schindler
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1762-bw.patch, LUCENE-1762.patch, LUCENE-1762.patch, LUCENE-1762.patch, LUCENE-1762.patch, 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 also adds tests for the new basic attribute impls (copies of the Token tests).

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org