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

ASF GitHub Bot logged work on LANG-1426:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Sep/19 16:54
            Start Date: 15/Sep/19 16:54
    Worklog Time Spent: 10m 
      Work Description: mikkomaunu commented on issue #458: [LANG-1426] 
Corrected usage examples in Javadocs
URL: https://github.com/apache/commons-lang/pull/458#issuecomment-531581389
 
 
   > 
   > 
   > Why not also properly document legal inputs with `@throws`?
   
   Makes perfectly sense. Which approach is preferred:
   
   One throws per Exception type:
   
   `@throws IllegalArgumentException If {@code offset} or {@code maxWidth} is 
less than {@code 0} `
   
   or:
   
   ```
   @throws IllegalArgumentException If {@code offset} is less than {@code 0} 
   @throws IllegalArgumentException If {@code maxWidth} is less than {@code 0}
   ```
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 312687)
    Time Spent: 40m  (was: 0.5h)

> 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
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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
(v8.3.2#803003)

Reply via email to