jtulach opened a new pull request, #9589: URL: https://github.com/apache/netbeans/pull/9589
While writing a unit tests for `ProjectsRootNode` I realized that `ProjectsRootNode.getNodes(true)` violates the intended behavior. It should always wait for _optimal result_, but it doesn't not. The `addNotify` schedules `setKeys` called into a deferred `RP` task.... as such `getChildren().getNodes(true)` may return empty array while they should see the result of `setKeys`. Modifying the code in `getNodes(boolean optimalResult)` to update the keys when `optimalResult` is requested. This alignes with `ProjectsRootNode.getNodesCount` which was already updating the keys with `setKeys` when optimal result was requested. Prior to change in `ProjectsRootNode.getNodes(boolean)` my new unit tests (also part of this PR) were failing. Now they are reliably passing. -- 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
