garydgregory commented on PR #1887:
URL: https://github.com/apache/commons-lang/pull/1887#issuecomment-6988919014

   @joao-jordy 
   
   Thanks for identifying the incomplete array-prefix case. I addressed it in 
[8702a43](https://github.com/apache/commons-lang/commit/8702a433f0aff434b4c255eba0c27b54a33e6457),
 incorporating the exception change with several integration and coverage 
improvements.
   
   The PR needed further work before merging:
   
   - **Integration with #1886:** The prefix optimization and additional 
regression tests were already present in the current code. This PR overlaps 
that implementation and leaves the newer bracket-only test expecting 
`StringIndexOutOfBoundsException`. The replacement commit preserves the 
existing single-loop processing and updates that test.
   - **Test coverage:** The PR checks only `"["` and `"[[["` for each method. 
The replacement tests both methods with 1, 2, 3, 255, 256, and 1,000 brackets 
and verifies exception messages. It also adds direct package-name extraction 
tests for primitive, reference, and nested-class arrays, while retaining the 
existing short-name array tests.
   - **Javadoc:** The PR adds an explicit check while retaining the statement 
that names are “not checked.” The replacement clarifies that names are not 
fully validated and documents the specific exception.
   - **Release notes:** The replacement records the exception-type change and 
credits this contribution.
   
   The scope also matters: these methods assume class-name input and do not 
comprehensively validate class or package identifiers. Other malformed names 
remain accepted. This change provides a deliberate exception for an incomplete 
array prefix; it does not establish a general validation policy. Passing 
japicmp does not eliminate the behavioral impact on callers catching 
`StringIndexOutOfBoundsException` or `IndexOutOfBoundsException`.
   
   The replacement passed the full Maven verification, including tests, static 
checks, compatibility checks, and Javadoc generation.
   
   Closing; you are credited in `changes.xml`.
   
   


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

Reply via email to