joao-jordy opened a new pull request, #1887:
URL: https://github.com/apache/commons-lang/pull/1887

   \`getPackageName(String)\` and \`getShortClassName(String)\` throw 
\`StringIndexOutOfBoundsException\` for names made only of \`[\`, such as 
\`"["\` or \`"[[["\`. Those are not class names. \`getCanonicalName(String)\` 
already rejects them with \`IllegalArgumentException\`.
   
   This PR makes the raw-name methods throw the same 
\`IllegalArgumentException\` ("Invalid class name ...") and documents it with 
\`@throws\` in the Javadoc. It does not return invented values.
   
   - No signatures change. japicmp (3.22.0 baseline): no compatibility issues.
   - Callers that catch \`StringIndexOutOfBoundsException\` for this input 
would see \`IllegalArgumentException\` instead. Both are unchecked.
   - The O(n^2) prefix fix is in a separate PR.
   
   Note: CONTRIBUTING asks for a JIRA key in the commit message. There is none 
yet; happy to open one if a maintainer wants it.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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