Skip to content

GROOVY-11978: RootLoader duplicates the core jar already on the boots…#2504

Merged
paulk-asert merged 1 commit intoapache:masterfrom
paulk-asert:groovy11978
May 2, 2026
Merged

GROOVY-11978: RootLoader duplicates the core jar already on the boots…#2504
paulk-asert merged 1 commit intoapache:masterfrom
paulk-asert:groovy11978

Conversation

@paulk-asert
Copy link
Copy Markdown
Contributor

@paulk-asert paulk-asert commented May 1, 2026

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 1, 2026

Codecov Report

❌ Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.2223%. Comparing base (8dde1c8) to head (54bcbd4).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...ain/java/org/codehaus/groovy/tools/RootLoader.java 38.8889% 8 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2504        +/-   ##
==================================================
- Coverage     67.2264%   67.2223%   -0.0041%     
- Complexity      31984      31987         +3     
==================================================
  Files            1468       1468                
  Lines          123923     123944        +21     
  Branches        22251      22258         +7     
==================================================
+ Hits            83309      83318         +9     
- Misses          33433      33439         +6     
- Partials         7181       7187         +6     
Files with missing lines Coverage Δ
...ain/java/org/codehaus/groovy/tools/RootLoader.java 45.0000% <38.8889%> (-1.5116%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Addresses GROOVY-11978 by preventing RootLoader from re-adding core Groovy JARs that are already present on the JVM’s startup classpath, avoiding duplicate class/resource definitions.

Changes:

  • Compute a canonicalized set of files from java.class.path.
  • Skip adding LoaderConfiguration URLs that resolve to files already present on that startup classpath.
  • Add helper methods to canonicalize URL/File entries for reliable comparisons.

Comment thread src/main/java/org/codehaus/groovy/tools/RootLoader.java Outdated
Comment thread src/main/java/org/codehaus/groovy/tools/RootLoader.java
Comment thread src/main/java/org/codehaus/groovy/tools/RootLoader.java
@paulk-asert paulk-asert merged commit 57662d1 into apache:master May 2, 2026
24 checks passed
@paulk-asert paulk-asert deleted the groovy11978 branch May 2, 2026 05:50
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.

3 participants