This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 77372 - Avoid "double-checking" pattern
Summary: Avoid "double-checking" pattern
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 06:42 UTC by Vladimir Kvashin
Modified: 2006-06-05 08:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2006-06-05 06:42:43 UTC
There is a copuple of places in code where so-called double-checking pattern is
used. Avoid it since there is a synchronization issue when using this pattern in
Java (see http://www-128.ibm.com/developerworks/java/library/j-dcl.html).
Comment 1 Vladimir Kvashin 2006-06-05 08:16:45 UTC
Fixed. Replaced with static field initializer.

Affected files:
/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/cache/CacheManager.java
/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/CodeModelRequestProcessor.java
/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/Notificator.java
/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/platform/ModelSupport.java
/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/platform/ProjectListenerThread.java