This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In tests I have seen SourceUtils.isScanInProgress() returning false and SU.waitScanFinished() returning successfully when RepositoryUpdater was still scanning (proved by a task passed to JavaSource.runWhenScanFinished() not being executed synchronously). No, this isn't caused by a stray event. See the XXX comment in EjbActionGroupTest in j2ee/ejbcore. Please make these method behave as they used to, so that the scenario above holds.
Marking as defect because this also delays JavaSource user action tasks without user feedback that there is a scan in progress, as seen in issue 122852.
These methods are inherently unsafe (their semantics does not guarantee that the background scan does not start right after the method returned). Moreover, waitScanFinished is deprecated. Please use runWhenScanFinished, which is a supported method.
Quoting from desc1: "proved by a task passed to JavaSource.runWhenScanFinished() not being executed synchronously" I'm obviously using runWhenScanFinished(). I'm also talking about tests, where I control the events and there is no way for the Java infrastructure to start running again.
Tomasi, please take a look at it. Thanks
It was actually caused by race condition the SU.wSF can caused. The method shouldn't be used in code but it may sense to create similar barrier method in the TestUtil. There is also call for: TestUtil.setIndexFolder() TestUtil.scheduleAndWait() TestUtil.setEnableLibraries() Even if I forgot something, it's on the Andrei's board, so he can check ;-)
Fixed: cc7257880f67
> ... it's on the Andrei's board, so he can check ;-) He has checked. Looks very good, thanks!