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

Jeff commented on LANG-1426:
----------------------------

[~suraj gautam] I am aware of that. I am saying that the JavaDoc for the two 
examples above claim that the method will *not* throw an exception, but it is 
obvious that they *should* throw an exception. The JavaDoc should be updated to 
state that they do throw an exception.

> 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)

Reply via email to