You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Woody Anderson (JIRA)" <ji...@apache.org> on 2010/07/18 05:15:50 UTC

[jira] Updated: (LUCENE-2546) AbstractField should not have a tokenStream member variable, it is unused. each subclass should manage their own if needed

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

Woody Anderson updated LUCENE-2546:
-----------------------------------

    Attachment: LUCENE-2546.patch

this removes the "tokenStream variable hidden" warning in NumericField, and in general is the better approach to an unused variable in AbstractField. There are subclasses that have specific tokenstreams and their impls should not be encumbered by abstractfields variable declaration.

In this case, Field is the only class that actually uses tokenStream without overwriting it with a local private member. So i simply removed the variable from AbstractField and added it to Field.

this is mostly cosmetic, but coding bugs can arrise from these kind of variable hiding issues.

> AbstractField should not have a tokenStream member variable, it is unused. each subclass should manage their own if needed
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2546
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2546
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Woody Anderson
>         Attachments: LUCENE-2546.patch
>
>


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