Tracing | Avoid instanceofSynchronization
If you do not require synchronized access to resources, avoid using the synchronized keyword in method or block. If there is such a need, try to minimize the code block.
Similarly, if you do not require protecting any shared resources, use:
- java.util.ArrayList instead of java.util.Vector
- java.util.HashMap instead of java.util.Hashtable