Skip to content

Conversation

Choosechee
Copy link

I've replaced a use of the internal JUnit class org.junit.platform.commons.util.ClassUtils with a new custom org.spockframework.util.ClassUtilclass. This fixes issue #1227 (tested with my project).

@AndreasTu AndreasTu self-requested a review October 18, 2025 18:49
@AndreasTu AndreasTu added this to the 2.4-M7 milestone Oct 18, 2025
@AndreasTu AndreasTu linked an issue Oct 18, 2025 that may be closed by this pull request
Copy link
Member

@AndreasTu AndreasTu left a 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.

@AndreasTu AndreasTu enabled auto-merge (squash) October 18, 2025 19:22
public class ClassUtil {
public static @NotNull String nullSafeToString(@Nullable Class<?> clazz) {
if (clazz != null)
return clazz.toString();
Copy link
Member

@AndreasTu AndreasTu Oct 18, 2025

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 {
Copy link
Member

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

@AndreasTu AndreasTu disabled auto-merge October 18, 2025 19:36
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.

Testing java modules throws java.lang.IllegalAccessError

2 participants