David Gilbert wrote:
This patch (committed) adds info about null arguments to the API docs for the Collections.sort() methods:

2006-11-10  David Gilbert  <[EMAIL PROTECTED]>

   * java/util/Collections.java
   (sort(List)): Minor API doc addition,
   (sort(List, Comparator)): Likewise.

Regards,

Dave



THIS patch.
Regards,

Dave
Index: java/util/Collections.java
===================================================================
RCS file: /sources/classpath/classpath/java/util/Collections.java,v
retrieving revision 1.42
diff -u -r1.42 Collections.java
--- java/util/Collections.java  9 Jun 2006 17:02:32 -0000       1.42
+++ java/util/Collections.java  10 Nov 2006 16:35:21 -0000
@@ -1903,10 +1903,11 @@
    * sorts the array, and then iterates over the list setting each element from
    * the array.
    *
-   * @param l the List to sort
+   * @param l the List to sort (<code>null</code> not permitted)
    * @throws ClassCastException if some items are not mutually comparable
    * @throws UnsupportedOperationException if the List is not modifiable
-   * @throws NullPointerException if some element is null
+   * @throws NullPointerException if the list is <code>null</code>, or contains
+   *     some element that is <code>null</code>.
    * @see Arrays#sort(Object[])
    */
   public static void sort(List l)
@@ -1922,13 +1923,15 @@
    * sorts the array, and then iterates over the list setting each element from
    * the array.
    *
-   * @param l the List to sort
+   * @param l the List to sort (<code>null</code> not permitted)
    * @param c the Comparator specifying the ordering for the elements, or
-   *        null for natural ordering
+   *        <code>null</code> for natural ordering
    * @throws ClassCastException if c will not compare some pair of items
    * @throws UnsupportedOperationException if the List is not modifiable
-   * @throws NullPointerException if null is compared by natural ordering
-   *        (only possible when c is null)
+   * @throws NullPointerException if the List is <code>null</code> or 
+   *         <code>null</code> is compared by natural ordering (only possible 
+   *         when c is <code>null</code>)
+   *         
    * @see Arrays#sort(Object[], Comparator)
    */
   public static void sort(List l, Comparator c)

Reply via email to