-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove custom array handling already covered by Class.forName()
#4250
Conversation
`Class.forName()` from `java.base/java.lang` has already built-in support for type names matching: - _Primitive arrays such as "[I", "[[[[D", etc._ and - _Object arrays such as "[Ljava.lang.String;", etc._ This commit deletes the redundant implementation from JUnit's internal `ReflectionUtils` helper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find! 👍
Related Issues
Specifically, the enhancement proposed by @sormuras was made possible by the changes made in conjunction with #3290. |
Class.forName()
Class.forName()
This is a prerequisite for #4250.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch!
It's good to know that Class.forName()
handles array names out of the box (in contrast to ClassLoader.loadClass()
). 👍
The PR looks good, and I committed 0fe36c7 to ensure we have the necessary test coverage in place.
Thanks for the reviews and double/triple-checking. |
Overview
Class.forName()
fromjava.base/java.lang
has built-in support for array type names matching:This pull request deletes the redundant implementation from JUnit's internal
ReflectionUtils
helper.I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations