Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293986

Incorrect double-checked locking in com.sun.beans.introspect.ClassInfo

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5
    • 20
    • 11, 17, 18, 19, 20
    • client-libs
    • None

    Description

      There are 3 incorrect double-checked locking cases in ClassInfo:
          private List<Method> methods;
          private Map<String,PropertyInfo> properties;
          private Map<String,EventSetInfo> eventSets;

      For example:

          public List<Method> getMethods() {
              if (this.methods == null) {
                  synchronized (this.mutex) {
                      if (this.methods == null) {
                          this.methods = MethodInfo.get(this.type);
                      }
                  }
              }
              return this.methods;
          }

      'methods' is not volatile and read multiple times. This makes it an incorrect DCL.

      Attachments

        Issue Links

          Activity

            People

              aturbanov Andrey Turbanov
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: