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

Clarification needed for some methods in java.awt.List

XMLWordPrintable

    • generic
    • generic

      Some clarification are needed for the following methods:

      public void add(String item)
      - what happen if the item is null ?
      the spec for public void add(String item, int index) states that if item is null,
      then the item is treated as an empty string, "". Should it also apply to add(String) as well. If so, same statement should be added to the add(String)

      public void replaceItem(String newValue, int index)
      - the doesn't say anything about null newValue ? should it throw any exception or should it be treated as empty string ?

      public void remove(String item)
      - the spec states that IllegalArgumentException - if the item doesn't exist in the list, does it also include null item ?



      ###@###.### 2005-03-29 19:39:17 GMT

            denis Denis Fokin (Inactive)
            hji Huafang Ji (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: