Commons IO
  1. Commons IO
  2. IO-343

org.apache.commons.io.comparator Javadoc is inconsistent with real code

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None

      Description

      Package org.apache.commons.io.comparator has a lot of inconsistent JavaDocs.
      For example this class org.apache.commons.io.comparator.NameFileComparator
      http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java?view=markup
      has JavaDocs
      List<File> list = ...
      NameFileComparator.NAME_COMPARATOR.sort(list); ....

      File[] array = ...
      NameFileComparator.NAME_INSENSITIVE_REVERSE.sort(array);

      but this will not work because all static members of NameFileComparator declared as Comparator<File> for example
      public static final Comparator<File> NAME_REVERSE = new ReverseComparator(NAME_COMPARATOR);
      public static final Comparator<File> NAME_INSENSITIVE_REVERSE = new ReverseComparator(NAME_INSENSITIVE_COMPARATOR);

      and Comparator class doesn't have the sort() method.

      1. patch.txt
        13 kB
        Igor Lash

        Activity

        Igor Lash created issue -
        Igor Lash made changes -
        Field Original Value New Value
        Summary JavaDoc is inconsistent with real codo JavaDoc is inconsistent with real code
        Igor Lash made changes -
        Attachment patch.txt [ 12542579 ]
        Gary Gregory made changes -
        Summary JavaDoc is inconsistent with real code org.apache.commons.io.comparator Javadoc is inconsistent with real code
        Gary Gregory made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5 [ 12322486 ]
        Resolution Fixed [ 1 ]
        Sebb made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Sebb made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Igor Lash
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development