aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Siano (JIRA)" <>
Subject [jira] [Created] (ARIES-1113) Double checked locking in BundleRevisionResource
Date Thu, 05 Sep 2013 05:54:51 GMT
Stephan Siano created ARIES-1113:

             Summary: Double checked locking in BundleRevisionResource
                 Key: ARIES-1113
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
            Reporter: Stephan Siano

The class org.apache.aries.subsystem.core.internal.BundleRevisionResource contains the following

private ParsedServiceElements getParsedServiceElements() {
  ParsedServiceElements result = elements;
  if (result == null) {
    synchronized (this) {
      result = elements;
      if (result == null)
        elements = result = computeParsedServiceElements();
  return result;

It is well known that this double checked locking ideom does not work. It should be changed
to something like

private synchronized ParsedServiceElements getParsedServiceElements() {
  if (elements == null)
    elements = computeParsedServiceElements();
  return elements;

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message