eirikbakke commented on code in PR #9327:
URL: https://github.com/apache/netbeans/pull/9327#discussion_r3068237657
##########
ide/jumpto/src/org/netbeans/modules/jumpto/symbol/ContentProviderImpl.java:
##########
@@ -391,8 +391,6 @@ public void run() {
if (done || resultChanged) {
lastSize = newSize[0];
lastProvCount = newProvCount;
- model.remove(toRemove);
- model.add(toAdd);
Review Comment:
I see what you mean; yes, the individual remove and add calls are probably
thread-safe, and the main change was to do them atomically together and not if
the task was canceled at the time when they are ready to run.
The new approach seems a bit cleaner, but the change is not actually needed
to fix the bug described in this PR (I confirmed this). I initially thought the
bug might be due to race conditions in the dialog itself, and had instructed
Claude to look for potential race conditions. If it's easier we can just drop
this part of the patch.
--
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