Skip to content

Commit 9bcaaaf

Browse files
committed
[fixes #3474] lombok.jar now contains zero paths that could clash with other modules, as that's already enough to trigger split package errors from jigsaw.
1 parent 9ef9b58 commit 9bcaaaf

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

buildScripts/compile.ant.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor,isolating</echo>
282282
<patternset refid="packing.shadowed" />
283283
</multirootfileset>
284284
<firstmatchmapper>
285-
<globmapper from="*.class" to="*.SCL.lombok" />
285+
<globmapper from="*.class" to="SCL.lombok/*.SCL.lombok" />
286286
<identitymapper />
287287
</firstmatchmapper>
288288
</mappedresources>

doc/changelog.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Lombok Changelog
1010
* 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).
1111
* BUGFIX: Extension methods can now be used in records. [Issue #3450](https://github.com/projectlombok/lombok/issues/3450).
1212
* BUGFIX: `@Getter(lazy=true)` with complicated initialization expressions would fail on javac. [Issue #3314](https://github.com/projectlombok/lombok/issues/3314).
13+
* 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).
1314

1415
### v1.18.28 (May 24th, 2023)
1516
* PLATFORM: JDK20 support added. [Issue #3353](https://github.com/projectlombok/lombok/issues/3353).

src/launch/lombok/launch/ShadowClassLoader.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,13 @@ private boolean isPartOfShadowSuffix(String url, String name, String suffix) {
430430
return false;
431431
}
432432

433+
private String toSclResourceName(String name) {
434+
return "SCL." + sclSuffix + "/" + name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
435+
}
436+
433437
@Override public Enumeration<URL> getResources(String name) throws IOException {
434438
String altName = null;
435-
if (name.endsWith(".class")) altName = name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
439+
if (name.endsWith(".class")) altName = toSclResourceName(name);
436440

437441
// Vector? Yes, we need one:
438442
// * 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 @@ private boolean isPartOfShadowSuffix(String url, String name, String suffix) {
475479
private URL getResource_(String name, boolean noSuper) {
476480
String altName = null;
477481
name = shader == null ? name : shader.reverseResourceName(name);
478-
if (name.endsWith(".class")) altName = name.substring(0, name.length() - 6) + ".SCL." + sclSuffix;
482+
if (name.endsWith(".class")) altName = toSclResourceName(name);
479483

480484
for (File ce : override) {
481485
URL url = getResourceFromLocation(name, altName, ce);

0 commit comments

Comments
 (0)