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

SSLSessionImpl finalize overhead

    XMLWordPrintable

Details

    Backports

      Description

        The finalizer on sun.security.ssl.SSLSessionImpl is unnecessary and ineffective in most cases.
        The specification for SSLSession does not specify the behavior of the values bound to the SSL session during finalization.

        The finalizer in SSLSessionImpl describes removing values from the binding table. Since the table is being collected at the same time as the SSLSessionImpl, there is no reason to remove the values except for a side-effect.

        The side-effect of removing values from the binding table is a conditional generation of the unbinding event if the value implements SSLSessionBindingListener. The unbinding event contains a reference to the SSLSessionImpl.

        The presence of the finalize method creates extra overhead for garbage collection and delays collection of the related objects.
        The finalization is ineffective and should be removed.

        Attachments

          Issue Links

            Activity

              People

                rriggs Roger Riggs
                rriggs Roger Riggs
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: