commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suraj Gautam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1426) JavaDoc issue on StringUtils.truncate
Date Sat, 16 Mar 2019 08:37:00 GMT

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

Suraj Gautam commented on LANG-1426:
------------------------------------

The offset cannot be negative, sir. Integer.MIN_VALUE is not a valid offset.

> JavaDoc issue on StringUtils.truncate
> -------------------------------------
>
>                 Key: LANG-1426
>                 URL: https://issues.apache.org/jira/browse/LANG-1426
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Jeff
>            Priority: Trivial
>
> Two of the examples on the method StringUtils.truncate(String, int, int) are incorrect:
>  * StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, 10) = "abcdefghij"
>  * StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, Integer.MAX_VALUE) = "abcdefghijklmno"
> Both of the above actually throw IllegalArgumentException's.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message