Don't use intern'ed strings to synchronize on

Description

Openfire uses strings (often namespaced, to reduce the likelyhood of problems) as locks, eg:

synchronized ( username + SOME_CONSTANT ) { // ... }

Although the namespacing severely reduces the likelyhood of accidental / unintended re-use of the lock in unrelated code (which introduces the potential for deadlocks), this solution is far from ideal. A better one should be found.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created April 11, 2020 at 5:57 PM
Updated October 12, 2021 at 1:36 PM
Resolved April 14, 2020 at 10:25 AM

Flag notifications