Mike Matrigali wrote:


Kathey Marsden (JIRA) wrote:
[ https://issues.apache.org/jira/browse/DERBY-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-700:
---------------------------------

    Attachment: derby-700_with_NPE_fix_diff.txt
If string.intern()sync does not work then following comment does not matter.

It looks like code does synchronized(DERBY_JVM_ID) but I think it wants to do synchronized on intern of that string.

Actually string constants are by definition interned, so synchronized(DERBY_JVM_ID) is the same as synchronized(DERBY_JVM_ID.intern()) since DERBY_JVM_ID is a reference to a string constant. Though using intern() wouldn't harm and might make the code more readable.

Dan.


Reply via email to