[
https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621322
]
ASF GitHub Bot logged work on LANG-1664:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Jul/21 23:03
Start Date: 10/Jul/21 23:03
Worklog Time Spent: 10m
Work Description: oneiros-de commented on pull request #777:
URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877714792
This is wrong - the "separator" is not an index but a char used by
`String#indexof(int)`.
See also the unit test
`StringUtilsSubstringTest.testSubstringBefore_StringInt`
So the description of the method is mostly correct (the description of
`separator` is wrong, should be "character (Unicode code point", not "String");
the examples simply don't match the code (the unit test has working examples).
An `@see String#indexOf(int)` would help.
And this should be done for similar functions.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 621322)
Time Spent: 0.5h (was: 20m)
> Javadoc for StringUtils.substringBefore(String str, int separator) doesn't
> mention that the separator is an int
> ----------------------------------------------------------------------------------------------------------------
>
> Key: LANG-1664
> URL: https://issues.apache.org/jira/browse/LANG-1664
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.12.0
> Reporter: Martin Schröder
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The javadoc of {{StringUtils.substringBefore(String str, int separator)}}
> talks of the separator as a String, not as an int (and so doesn't explain
> what the separator param is).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)