Adding generics to all *Event classes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: core-libs

      Name: rmT116609 Date: 06/16/2004


      A DESCRIPTION OF THE REQUEST :
      It would be nice if all *Event classes used generics when calling update methods.

      JUSTIFICATION :
      It would eliminate unnessesary casts.


      ---------- BEGIN SOURCE ----------
      In java.util.Observer the update method:
      void update(Observable o, Object arg)
      could be changed to:
      void update(Observable o, E arg)
      and initialisation should look like this:
      new java.util.Observer<String>() {
        void update(Observable o, String arg) { ... do something ... }
      });
      ---------- END SOURCE ----------

      What I meant was that for instance java.util.Observer should be changed to:
      public interface Observer<E> {
            void update(Observable o, E arg);
      }
      (Incident Review ID: 280133)
      ======================================================================

            Assignee:
            Stuart Marks
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: