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

Anomaly in DataSet methods and those inherited from Collection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 6
    • 1.0
    • core-libs
    • None
    • generic
    • generic

      The insert signature in DataSet is as follows :-
      public void insert(T row) throws SQLException

      and from collection is as :-
      boolean add(E o)

      Some points to look at :-
      (i) Both do the same thing, so why two methods ?
      And they do exactly same.

      (ii) One throws SQLException other does not.

      (iii) One returns boolean other returns void.

      Some alignment needs to be done for these methods so that they can make sense
      individually. Or do they make sense this way only
      (having differrent return types and throwing differrent Exceptions)
      This needs to be reviewed.

      Also does the method DataSet.modify() need to return a boolean true value when modification happens fine and false otherwise.
      This needs to be reviewed.

      Also delete and remove are fine since one removes instance T other one removes Object instance o.
      ###@###.### 10/5/04 08:54 GMT

            lancea Lance Andersen
            ahandasunw Amit Handa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: