Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 379 Bytes

PH_S027.md

File metadata and controls

9 lines (5 loc) · 379 Bytes

PH_S027 - Leaked Outbound Collection

Problem

The access to a collection is protected synchronized with the help of monitor locks, but a reference is returned. The returned reference allows unprotected accesses to the collection, thus neglecting the synchronization effort.

Solution

Return the reference of a copy of the collection instead of the original collection.