-
Notifications
You must be signed in to change notification settings - Fork 476
Issue #1227: Fix module testing not working due to call to JUnit internal API #2187
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
base: master
Are you sure you want to change the base?
Conversation
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.
@Choosechee Thank you very much for your contribution.
public class ClassUtil { | ||
public static @NotNull String nullSafeToString(@Nullable Class<?> clazz) { | ||
if (clazz != null) | ||
return clazz.toString(); |
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.
The org.junit.platform.commons.util.ClassUtils
uses Class.getName()
instead of Class.toString()
.
Please change that, to ensure compatibility with existing code.
import java.util.Arrays; | ||
import static java.util.stream.Collectors.joining; | ||
|
||
public class ClassUtil { |
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.
Please add a line in
docs\release_notes.adoc
under
== 2.4 (tbd)
=== Misc
* Fix module testing not working due to call to JUnit internal API spockPull:2187[]
I've replaced a use of the internal JUnit class
org.junit.platform.commons.util.ClassUtils
with a new customorg.spockframework.util.ClassUtil
class. This fixes issue #1227 (tested with my project).