mbien commented on code in PR #8590:
URL: https://github.com/apache/netbeans/pull/8590#discussion_r2160306034
##########
ide/parsing.lucene/src/org/netbeans/modules/parsing/lucene/MemoryIndex.java:
##########
@@ -304,7 +290,7 @@ private synchronized IndexReader getReader() throws
IOException {
private synchronized void refreshReader() throws IOException {
assert lock.isWriteLockedByCurrentThread();
if (cachedReader != null) {
- final IndexReader newReader = cachedReader.reopen();
+ IndexReader newReader = IndexReader.openIfChanged(cachedReader);
Review Comment:
good catch will fix.
`reopen()` is implemented in 3.6.2 as:
```
final IndexReader newReader = IndexReader.openIfChanged(this);
if (newReader == null) {
return this;
} else {
return newReader;
}
```
will inline this. 4.0.0 moved `openIfChanged` to `DirectoryReader` but it
still exists, so it is a useful refactoring still.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists