sdedic opened a new pull request, #4097: URL: https://github.com/apache/netbeans/pull/4097
The bug manifests in several places. Most notably in vscode DB Explorer where a `Refresh` action causes vscode-nbls communication to fail with `Node xxx is already present`. This is caused by creation of a new node - a new identity, which is equal() to the previously created node, which is still in the map (since the client may still ask for its details). And that node is created (since keys - underlying DB data) did not actually even change is done because of some of DB children use `ChildFactory` SPI from Nodes - this is the other fix. It turned out that `add` method of the `j.u.List` passed to `ChildFactory.createKeys()` is tweaked so it detects actual addition beyond the original content - and causes interim keys refresh, which, in turn, causes Node removal for whose keys are not (yet) present, since the `ChildFactory` did not add them. Note that this fix is not a complete fix - if a (really) new node is inserted among existing, the nodes will be destroyed + recreated. I think it is probably impossible to fix without breaking Children and its event semantics. But the fix corrects situation when the content actually does not change or is only added to. @jhorvath please decide whether the fix should go to `master` or it is critical for DB explorer (where it mainly appears, but I've encountered it elsewhere as well) so `vscode` extension could benefit from inclusion in NB14. -- 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
