Skip to content

New Patcher instance to remove problem enum values from the shadowed jspecify NullMarked class#2982

Merged
jtduffy merged 3 commits into
mainfrom
shadow-nullmarked-filter
Jul 20, 2026
Merged

New Patcher instance to remove problem enum values from the shadowed jspecify NullMarked class#2982
jtduffy merged 3 commits into
mainfrom
shadow-nullmarked-filter

Conversation

@jtduffy

@jtduffy jtduffy commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Resolves #2976

Adds a new Patcher instance that runs during the shadowJar task that removes ElementType.MODULE and ElementType.RECORD_COMPONENT from the @target annotation on the shaded jspecify NullMarked class.
Both enum values were introduced after Java 8 and cause ArrayStoreException in Java 8's AnnotationParser
when Spring scans the agent JAR because of the presence of the shaded Caffeine v3 jar.

Also adds a README that summarizes every Patcher instance's functionality.

@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.84%. Comparing base (4576cc4) to head (2862f8c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2982      +/-   ##
============================================
+ Coverage     70.83%   70.84%   +0.01%     
- Complexity    10667    10672       +5     
============================================
  Files           873      873              
  Lines         42960    42970      +10     
  Branches       6501     6503       +2     
============================================
+ Hits          30429    30443      +14     
- Misses         9596     9598       +2     
+ Partials       2935     2929       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jasonjkeller jasonjkeller moved this from Triage to Needs Review in Java Engineering Board Jul 14, 2026
@jtduffy
jtduffy merged commit 31d8e83 into main Jul 20, 2026
267 of 268 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Code Complete/Done in Java Engineering Board Jul 20, 2026
@jtduffy
jtduffy deleted the shadow-nullmarked-filter branch July 20, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Code Complete/Done

Development

Successfully merging this pull request may close these issues.

Spring boot 2.8.x fat jars compiled under Java 8 and run in Java 8 runtime crash

5 participants