diff --git a/buildScripts/compile.ant.xml b/buildScripts/compile.ant.xml
index 7fe76655..9993333d 100644
--- a/buildScripts/compile.ant.xml
+++ b/buildScripts/compile.ant.xml
@@ -282,7 +282,7 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor,isolating
-
+
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index 5c7e5117..813e8e27 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -10,6 +10,7 @@ Lombok Changelog
* BUGFIX: Calling extension methods such that automatic widening is applied (i.e. calling `void ext(long arg)` with an `int`) would fail at runtime. [Issue #3463](https://github.com/projectlombok/lombok/issues/3463).
* BUGFIX: Extension methods can now be used in records. [Issue #3450](https://github.com/projectlombok/lombok/issues/3450).
* BUGFIX: `@Getter(lazy=true)` with complicated initialization expressions would fail on javac. [Issue #3314](https://github.com/projectlombok/lombok/issues/3314).
+* BUGFIX: Using the maven surefire plugin with a `module-info.java` based project would fail with a `SurefireBooterForkException`. [Issue #3474](https://github.com/projectlombok/lombok/issues/3474).
### v1.18.28 (May 24th, 2023)
* PLATFORM: JDK20 support added. [Issue #3353](https://github.com/projectlombok/lombok/issues/3353).
diff --git a/src/launch/lombok/launch/ShadowClassLoader.java b/src/launch/lombok/launch/ShadowClassLoader.java
index 013f46e5..b418a7f8 100644
--- a/src/launch/lombok/launch/ShadowClassLoader.java
+++ b/src/launch/lombok/launch/ShadowClassLoader.java
@@ -430,9 +430,13 @@ class ShadowClassLoader extends ClassLoader {
return false;
}
+ private String toSclResourceName(String name) {
+ return "SCL." + sclSuffix + "/" + name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
+ }
+
@Override public Enumeration getResources(String name) throws IOException {
String altName = null;
- if (name.endsWith(".class")) altName = name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
+ if (name.endsWith(".class")) altName = toSclResourceName(name);
// Vector? Yes, we need one:
// * We can NOT make inner classes here (this class is loaded with special voodoo magic in eclipse, as a one off, it's not a full loader.
@@ -475,7 +479,7 @@ class ShadowClassLoader extends ClassLoader {
private URL getResource_(String name, boolean noSuper) {
String altName = null;
name = shader == null ? name : shader.reverseResourceName(name);
- if (name.endsWith(".class")) altName = name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
+ if (name.endsWith(".class")) altName = toSclResourceName(name);
for (File ce : override) {
URL url = getResourceFromLocation(name, altName, ce);