Skip to content

Conversation

@eirv
Copy link
Contributor

@eirv eirv commented Jan 21, 2026

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request. Which AI tool was used to create this pull request, and to what extent did it contribute?
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test to avoid regression and proce that this actually fixes something. It's not clear to me it does since we show which class is really missing without the extra syntax we support here.

@eirv
Copy link
Contributor Author

eirv commented Jan 21, 2026

Please add a unit test to avoid regression and proce that this actually fixes something. It's not clear to me it does since we show which class is really missing without the extra syntax we support here.

The next variable gets modified during the transformation process (dots to dollar signs for inner classes), so using className preserves the original requested class name in the error message, making it more useful for debugging.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @eirv

Regardless of the argument, please add tests to demonstrate the intent and prevent regressions in the future. This will make it clear what the actual goal and implications are.

Update exception handling in assertGetClassThrowsException method to capture and verify exception messages.
@eirv
Copy link
Contributor Author

eirv commented Jan 22, 2026

Hello @eirv

Regardless of the argument, please add tests to demonstrate the intent and prevent regressions in the future. This will make it clear what the actual goal and implications are.

Okay, I've finished writing the unit test code. Please review my next commit.

@eirv eirv requested a review from garydgregory January 22, 2026 14:02
@garydgregory garydgregory merged commit b622445 into apache:master Jan 22, 2026
46 of 68 checks passed
@garydgregory garydgregory changed the title Fix ClassNotFoundException message variable Fix ClassNotFoundException messag Jan 22, 2026
@garydgregory garydgregory changed the title Fix ClassNotFoundException messag Fix ClassNotFoundException message in ClassUtils.getClass(String) Jan 22, 2026
@garydgregory
Copy link
Member

@eirv
Thank you for your contribution, merged! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants