It is better to use their new unsynchronized replacements:
-
ArrayListorLinkedListinstead ofVector -
Dequeinstead ofStack -
HashMapinstead ofHashtable -
StringBuilderinstead ofStringBuffer
Noncompliant Code Example
Vector cats = new Vector();
Compliant Solution
ArrayList cats = new ArrayList();
Exceptions
Use of those synchronized classes is ignored in the signatures of overriding methods.
@Override
public Vector getCats() {...}