OpenMRS

Replace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".

Replace Vector with ArrayList on this line: https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/module/web/filter/ModuleFilterMapping.java#L278 Background Information: Synchronized classes Vector, Hashtable, Stack and StringBuffer should not be used Early classes of the Java API, such as Vector, Hashtable and StringBuffer, were synchronized to make them thread-safe. Unfortunately, synchronization has a big negative impact on performance, even when using these collections from a single thread. It is better to use their new unsynchronized replacements: ArrayList or LinkedList instead of Vector Deque instead of Stack HashMap instead of Hashtable StringBuilder instead of StringBuffer

Task tags

  • coding

Students who completed this task

Tomasz DomagaƂa

Task type

  • code Code
close

2017