[jira] [Commented] (IO-343) org.apache.commons.io.comparator Javadoc is inconsistent with real code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (IO-343) org.apache.commons.io.comparator Javadoc is inconsistent with real code

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/IO-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634626#comment-13634626 ]

Sebb commented on IO-343:
-------------------------

URL: http://svn.apache.org/r1469107
Log:
[IO-343] org.apache.commons.io.comparator Javadoc is inconsistent with real code.
Fix Javadoc to agree with code

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java

               

> org.apache.commons.io.comparator Javadoc is inconsistent with real code
> -----------------------------------------------------------------------
>
>                 Key: IO-343
>                 URL: https://issues.apache.org/jira/browse/IO-343
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Igor Lash
>            Priority: Minor
>             Fix For: 2.5
>
>         Attachments: patch.txt
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira