XMLWordPrintable

Details

    • Sub-task
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 9
    • core-libs
    • b117

    Description

      The classes java.util.Observer and java.util.Observable should be deprecated. Applications should no longer use them.

      They don't provide a rich enough event model for applications. For example, they support only the notion that something has changed, but they don't convey any information about what has changed. There are also some thread-safety and sequencing issues that cannot be fixed compatibly.

      The evaluation of JDK-4180466, dating back to 1998 and 1999, states in part,

          [Observable] is no longer under active development. It is largely unused in
          the JDK, and has, for the most part, been superseded by the 1.1 Beans/AWT
          event model.

          Observable has fallen into disuse and is no longer under active development.

      Application developers should consider using java.beans for a richer change notification model. Or they should consider constructs in java.util.concurrent such as queues or semaphores to pass messages among threads, with reliable ordering and synchronization properties.

      Attachments

        Issue Links

          Activity

            People

              smarks Stuart Marks
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: