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

minor synchronization fixes and elimination of some unneeded finalizers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.1
    • 1.4.0
    • core-libs
    • None
    • ladybird
    • sparc
    • solaris_2.6

        The use of locks in the LDAP provider could be improved.

        NamingEventNotifier: rename finalize() to cleanup(). cleanup() is always called
           before the thread exits (in finally clause) so no need for a finalize()

        EventSupport: removeDeadNotifier() needs sync in case 'notifiers' is not
            completely constructed before this method is called (consistent with other
            access of 'notifiers';
            - fireUnsolicited() and cleanup() needs sync because they access unsolicited
            and notifiers
        Connection:
            - abandonRequeset(), ldapUnbind(): move synchronized closer to shared
              data access
            - replaceInputStream(), run(): expanded scope of synchronized to include
        update of inStream
            - Removed finalize(); thread's finally clause already calls cleanup()
        LdapClient:
            - finalize(): call forceClose() instead of close()
            - added internal version of getSearchReply() that skips some checks and setup
            - 'unsolicited' now initialized by default (instead of on-demand)
            - *Unsolicited() methods synchronize on 'unsolicited' instead of LdapClient
              to prevent possible deadlock

        LdapCtx:
            - reconnect(): removed synchronized modifier (not needed)
            - synchronize access to clnt.referenceCount and closing connection
            - *Unsolicited() methods synchronize on eventSupport instead of LdapCtx;
              syncing on LdapCtx is problemmatic when caller syncs on Context (prevents
              firing of Unsolicited Notifications).

              rleesunw Rosanna Lee (Inactive)
              rleesunw Rosanna Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: