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

Components shouldn't synchronize on getClass()

XMLWordPrintable

    • generic
    • generic

      Name: dmR10075 Date: 04/07/2003


      A number of components in java.awt package synchronize access to
      static fields from instance methods on getClass(). This is dangerous,
      as for descendants getClass will return different class object. So
      descendant X will synchronize on X.class while ancestor Y will
      synchronize on Y.class and in result access will be unsynchronized.

      ======================================================================

            son Oleg Sukhodolsky (Inactive)
            domsunw Dom Dom (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: