I spotted while I was looking at how the osgi-framework code uses the
metadata that there are a number of places using unsynchronized HashMap, ArrayList,
etc. for mutable data.
The original one I spotted was a cache of attributes, but searching for HashMap
I found others introduced in the BundleManager and the Resolver.
Besides not being thread safe - for things like HashMap or LinkedList this can
cause the code to go into a infinite loop when links end up pointing at themselves
due to concurrent modification.
I've only looked at and corrected the framework code. But there's obviously
other places that have this problem, e.g.
has an unsynchronized HashMap to track deployments.
View the original post :
Reply to the post :