lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30736] - [PATCH] to remove synchronized code from TermVectorsReader
Date Thu, 19 Aug 2004 11:47:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30736

[PATCH] to remove synchronized code from TermVectorsReader





------- Additional Comments From otis@apache.org  2004-08-19 11:47 -------
Bernhard,

Thanks for the patch.  The unit test requires class o.a.lucene.util.English. 
This is not in CVS.  Is this something that should be in the CVS?  What is it?

I am also wondering about this piece of code:

-      termVectorsReader = new TermVectorsReader(cfsDir, segment, fieldInfos);
+       final Directory dir = cfsDir;
+       termVectorsLocal = new ThreadLocal() {
+               protected synchronized Object initialValue() {
+                       try {
+                               return new TermVectorsReader(dir, segment,
fieldInfos);
+                       } catch (IOException ioe) {
+                               ioe.printStackTrace();
+                               return null;
+                       }
+               }
+       };

Is is a good thing to 'eat' that IOException and quietly return null?  The
method where this code is, is already throwing IOException, so why not let the
IOException pop up?

Finally, it looks like diffs contain tabs.  Could you please change tabs to 2
spaces?

Thanks,
Otis

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


Mime
View raw message