commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1059) Capitalize javadoc is incorrect
Date Fri, 05 Jun 2015 21:44:00 GMT

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

Bruno P. Kinoshita commented on LANG-1059:
------------------------------------------

Hi @Sebb

I agree with the OP and you as well. What I meant was that there are other methods in the
same class that have similar misleading documentation. e.g.:

* https://git1-us-west.apache.org/repos/asf?p=commons-lang.git;a=blob;f=src/main/java/org/apache/commons/lang3/StringUtils.java;h=29d709891d763729f042950dee69c93d85a14604;hb=HEAD#l5780

* https://git1-us-west.apache.org/repos/asf?p=commons-lang.git;a=blob;f=src/main/java/org/apache/commons/lang3/text/WordUtils.java;h=bc4d43811e9e8e0db579c8976fce358316c1f0d2;hb=HEAD#l262

* https://git1-us-west.apache.org/repos/asf?p=commons-lang.git;a=blob;f=src/main/java/org/apache/commons/lang3/text/WordUtils.java;h=bc4d43811e9e8e0db579c8976fce358316c1f0d2;hb=HEAD#l391

Sorry for the previous misleading comment, hope it's clearer now.

> Capitalize javadoc is incorrect
> -------------------------------
>
>                 Key: LANG-1059
>                 URL: https://issues.apache.org/jira/browse/LANG-1059
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.3.2
>            Reporter: Colin Casey
>            Priority: Minor
>
> The below also applies to uncapitalize.
> Currently the javadocs say:
> bq. Capitalizes a String changing the first letter to title case as per Character.toTitleCase(char).
No other letters are changed.
> A more accurate description would be: 
> bq. Capitalizes a String changing the first *character* to title case as per Character.toTitleCase(char).
No other letters are changed.
> capitalize("'word'") is an example where the current docs are false (note single-quote
is first character but not first letter and nothing gets capitalized)
> This may in fact be a bug if the current docs are correct.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message