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

ASF subversion and git services commented on LUCENE-5364:
---------------------------------------------------------

Commit 1549701 from [~steve_rowe] in branch 'dev/trunk'
[ https://svn.apache.org/r1549701 ]

LUCENE-5364: Replace hard-coded Version.LUCENE_XY that doesn't have to be 
hard-coded (because of back-compat testing or version dependent behavior, or 
demo code that should exemplify pinning versions in user code), with 
Version.LUCENE_CURRENT in non-test code, or with 
LuceneTestCase.TEST_VERSION_CURRENT in test code; upgrade hard-coded 
Version.LUCENE_XY constants that should track the next release version to the 
next release version if they aren't already there, and put a token near them so 
that they can be found and upgraded when the next release version changes: 
':Post-Release-Update-Version.LUCENE_XY:'

> Review usages of hard-coded Version constants
> ---------------------------------------------
>
>                 Key: LUCENE-5364
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5364
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/other
>    Affects Versions: 5.0, 4.7
>            Reporter: Steve Rowe
>            Priority: Minor
>         Attachments: LUCENE-5364-branch_4x.patch, LUCENE-5364-trunk.patch, 
> LUCENE-5364-trunk.patch
>
>
> There are some hard-coded {{Version.LUCENE_XY}} constants used in various 
> places.  Some of these are intentional and appropriate:
> * in deprecated code, e.g. {{ArabicLetterTokenizer}}, deprecated in 3.1, uses 
> {{Version.LUCENE_31}}
> * to make behavior version-dependent (e.g. {{StandardTokenizer}} and other 
> analysis components)
> * to test different behavior at different points in history (e.g. 
> {{TestStopFilter}} to test position increments)
> But should hard-coded constants be used elsewhere?
> For those that should remain, and need to be updated with each release, there 
> should be an easy way to find them.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

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

Reply via email to