lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Created: (LUCENE-2258) Remove "synchonized" from FuzzyTermEnum#similarity(final String target)
Date Wed, 10 Feb 2010 08:18:27 GMT
Remove "synchonized" from FuzzyTermEnum#similarity(final String target)

                 Key: LUCENE-2258
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Search
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
            Priority: Trivial
             Fix For: 2.9.2, Flex Branch, 3.0.1, 3.1

The similarity method in FuzzyTermEnum is synchronized which is stupid because of:
- TermEnums are the iterator pattern and so are single-thread per definition
- The method is private, so nobody could ever create a fake FuzzyTermEnum just to have this
method and use it multithreaded.
- The method is not static and has no static fields - so instances do not affect each other

The root of this comes from LUCENE-296, but was never reviewd and simply committed. The argument
for making it synchronized is wrong.

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:
For additional commands, e-mail:

View raw message