Svetlin Zarev created OWB-1154:
----------------------------------
Summary: Synchronization on a string literal
Key: OWB-1154
URL: https://issues.apache.org/jira/browse/OWB-1154
Project: OpenWebBeans
Issue Type: Bug
Affects Versions: 1.7.0, 1.7.1
Reporter: Svetlin Zarev
Priority: Minor
String literals are constant and are automatically interned, and hence act as
global variables in the JVM. If someone tries to synchronize on the same string
literal, a deadlock might occur. More information on the issue of synchronizing
on strings:
https://www.securecoding.cert.org/confluence/display/java/LCK01-J.+Do+not+synchronize+on+objects+that+may+be+reused
The affected method is initSessionContext(Object startupObject):
https://github.com/apache/openwebbeans/blob/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
The issue has been discovered as a result of static code analysis
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)