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

ObjectStreamClass is not thread-safe.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 1.2.0
    • core-libs


      allan.jacobs@Eng 1998-03-24

      ObjectStreamClass is not thread-safe. The other io classes seem to
      be OK.


      Only the static variables that are set and used in thread-unsafe
      methods are listed. Only methods that are thread-unsafe are listed.

      /**********************************************************************/
      java/io/ObjectStreamClass.java
      Variable: descriptorFor
         Set and used in findDescriptorFor.
         The method insertDescriptorFor used descriptorFor and also calls

         The method lookupInternal calls findDescriptorFor from a
         synchronized block.
         The method insertDescriptorFor calls findDescriptorFor from a
         unsynchronized block.

         The constructor for ObjectStreamClass calls insertDescriptorFor
         from an unsynchronized block. So, using this method may cause
         a thread-unsafe set of descriptorFor in the routine
         findDescriptorFor.

            jfialli Joe Fialli
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: