jczpqf commented on PR #616: URL: https://github.com/apache/felix-dev/pull/616#issuecomment-7348643298
@paulrutter I made a modification that reduces the amount of whitespace added. It was slightly different than what you suggested. One thing I think that is essential to resolving this issue is to perform this safety check, `revision.getWiring().getImportedPackageSource(pkgName)`, **after** `isAllowedDynamicImport` is called. Adding the safety check before isAllowedDynamicImport is called narrows down the window in which the race condition could happen but it is technically still possible for the wiring to be added by another thread after the safety check and before the `isAllowedDynamicImport` check. Performing the safety check after `isAllowedDynamicImport` ensures we do not return a null BundleRevision because it was already imported. -- 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]
