Aminark opened a new pull request, #1836:
URL: https://github.com/apache/commons-lang/pull/1836
Some `StringUtils` Javadoc examples call a different method or overload,
while others do not compile as Java. In particular,
`StringUtils.indexOfAny("zzabyycdxx", "")` selects the character-search
overload and returns `-1`, although the substring-search example promises `0`.
This documentation-only change:
- Uses `containsAnyIgnoreCase` in that method's examples.
- Uses explicit `CharSequence[]` arguments for single-substring searches and
explains the overload distinction.
- Uses character literals for `countMatches`, `removeStart`, and
`reverseDelimited`.
- Removes null-search-character guidance from the primitive `char` overload.
Runtime behavior and public APIs are unchanged.
Validation:
- `mvn -B -ntp`: BUILD SUCCESS, including Javadoc, Checkstyle, SpotBugs, PMD
and license checks. Surefire reported 24,782 tests, 0 failures, 0 errors, 2,466
skipped.
- Compiled and executed 851 literal-argument Javadoc examples against the
current sources; all checked results match after these corrections.
- `git diff --check` passed.
Checklist:
- [x] Read the contribution guidelines and ASF Generative Tooling Guidance.
- [x] AI assistance disclosed: OpenAI Codex prepared the changes, ran
validation, and drafted this PR.
- [x] Ran the default Maven build successfully.
- [x] Reviewed the diff; no runtime changes requiring new unit tests.
- [x] Used a descriptive `[javadoc]` commit message.
Replaces #1835 after renaming the source branch; the commits are unchanged.
--
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]