posted 20 years ago
Can't you handle the object locking in your code? Synchronize all instance access in a synchronize block. If you don't want to do this (because you'd have to change your code) there's a really nasty solution.
*** DISCLAIMER - NOT RECOMMENDED ***
Use the JAD decompiler to decompile the class you'd like synchronized, put in the synchronize modifiers, and recompile it (packaging it in the same JAR as the rest of the third party stuff if needed) overwriting the old version.
Now pray to god that your company never uses a different version of that library.