GeezerVison is showing github.com — Fix coverage-modified classes being included in published artifacts by dondonz · Pull Request #4341 · graphql-java/graphql-java
Conversation
The markGeneratedEqualsHashCode task was modifying .class files in-place
in build/classes/java/main and the jar task depended on it, causing
bytecode with injected @generated annotations to end up in the published
JAR. Fix by copying classes to a separate build/classes-jacoco directory
for modification, and only wiring jacocoTestReport (not jar) to depend
on the task.
https://claude.ai/code/session_01XDZqTUKLBoSJpGPGx9Amxg
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The markGeneratedEqualsHashCode task was modifying .class files in-place
in build/classes/java/main and the jar task depended on it, causing
bytecode with injected @generated annotations to end up in the published
JAR. Fix by copying classes to a separate build/classes-jacoco directory
for modification, and only wiring jacocoTestReport (not jar) to depend
on the task.
https://claude.ai/code/session_01XDZqTUKLBoSJpGPGx9Amxg
Test Report
Test Results
| Java Version |
Total |
Passed |
Failed |
Errors |
Skipped |
| Java 11 |
5708 (±0) |
5652 (±0) |
0 (±0) |
0 (±0) |
56 (±0) |
| Java 17 |
5708 (±0) |
5651 (±0) |
0 (±0) |
0 (±0) |
57 (±0) |
| Java 21 |
5708 (±0) |
5651 (±0) |
0 (±0) |
0 (±0) |
57 (±0) |
| Java 25 |
5708 (±0) |
5651 (±0) |
0 (±0) |
0 (±0) |
57 (±0) |
| jcstress |
32 (±0) |
32 (±0) |
0 (±0) |
0 (±0) |
0 (±0) |
| Total |
22864 (±0) |
22637 (±0) |
0 (±0) |
0 (±0) |
227 (±0) |
Code Coverage (Java 25)
| Metric |
Covered |
Missed |
Coverage |
vs Master |
| Lines |
29024 |
3250 |
89.9% |
-0.3% 🔴 |
| Branches |
8535 |
1685 |
83.5% |
-1.2% 🔴 |
| Methods |
7784 |
1260 |
86.1% |
-0.2% 🔴 |
Changed Class Coverage (59 classes)
| Class |
Line |
Branch |
Method |
| g.a.FieldComplexityEnvironment |
-33.0% 🔴 |
±0.0% |
-6.3% 🔴 |
| g.a.QueryVisitorFieldEnvironmentImpl |
+3.7% 🟢 |
-45.8% 🔴 |
+2.4% 🟢 |
| g.a.QueryVisitorFragmentDefinitionEnvironmentImpl |
-34.0% 🔴 |
±0.0% |
-17.1% 🔴 |
| g.a.QueryVisitorFragmentSpreadEnvironmentImpl |
-30.0% 🔴 |
±0.0% |
-22.9% 🔴 |
| g.a.QueryVisitorInlineFragmentEnvironmentImpl |
-27.8% 🔴 |
±0.0% |
-17.1% 🔴 |
| g.Assert |
+0.9% 🟢 |
+1.1% 🟢 |
±0.0% |
| g.c.ImmutableMapWithNullValues |
-2.8% 🔴 |
±0.0% |
-2.9% 🔴 |
| g.e.DataFetcherResult |
-2.1% 🔴 |
-14.3% 🔴 |
+1.4% 🟢 |
| g.e.ExecutionId |
-8.3% 🔴 |
+50.0% 🟢 |
-16.7% 🔴 |
| g.e.MergedField |
+0.3% 🟢 |
-3.6% 🔴 |
+1.4% 🟢 |
g.e.MergedField $MultiMergedField |
-13.2% 🔴 |
-25.0% 🔴 |
+2.5% 🟢 |
| g.e.NonNullableFieldWasNullError |
-18.2% 🔴 |
±0.0% |
-25.0% 🔴 |
| g.e.r.SingleSubscriberPublisher |
+1.5% 🟢 |
+4.5% 🟢 |
±0.0% |
g.e.r.SingleSubscriberPublisher $SimpleSubscription |
+5.6% 🟢 |
+25.0% 🟢 |
±0.0% |
| g.e.ResultPath |
+0.8% 🟢 |
-0.8% 🔴 |
+1.7% 🟢 |
| g.GraphQLContext |
-14.3% 🔴 |
-75.0% 🔴 |
-7.7% 🔴 |
g.GraphqlErrorBuilder $GraphqlErrorImpl |
±0.0% |
+85.7% 🟢 |
±0.0% |
| g.i.DeferPayload |
±0.0% |
+62.5% 🟢 |
±0.0% |
| g.i.IncrementalPayload |
-1.0% 🔴 |
-15.0% 🔴 |
+12.7% 🟢 |
| g.i.StreamPayload |
+5.4% 🟢 |
+62.5% 🟢 |
+8.3% 🟢 |
| g.InvalidSyntaxError |
+1.1% 🟢 |
±0.0% |
+4.0% 🟢 |
| g.l.IgnoredChar |
-7.9% 🔴 |
+50.0% 🟢 |
+8.6% 🟢 |
| g.l.SourceLocation |
-6.5% 🔴 |
-1.4% 🔴 |
±0.0% |
g.n.ExecutableNormalizedOperationToAstCompiler $ExecutionFragmentDetails |
-18.2% 🔴 |
+50.0% 🟢 |
±0.0% |
| g.n.NormalizedInputValue |
-6.9% 🔴 |
-18.7% 🔴 |
-6.7% 🔴 |
| g.r.DefaultConnection |
±0.0% |
+70.0% 🟢 |
+16.7% 🟢 |
| g.r.DefaultConnectionCursor |
+1.3% 🟢 |
+12.5% 🟢 |
+13.3% 🟢 |
| g.r.DefaultEdge |
-7.1% 🔴 |
+70.0% 🟢 |
+8.3% 🟢 |
| g.r.DefaultPageInfo |
+12.1% 🟢 |
+78.6% 🟢 |
+20.8% 🟢 |
| g.r.InvalidCursorException |
-16.7% 🔴 |
±0.0% |
-16.7% 🔴 |
g.s.DataFetchingFieldSelectionSetImpl $SelectedFieldImpl |
+1.1% 🟢 |
+10.0% 🟢 |
+2.5% 🟢 |
| g.s.d.EditOperation |
-25.9% 🔴 |
±0.0% |
-13.3% 🔴 |
| g.s.FieldCoordinates |
-6.5% 🔴 |
-18.8% 🔴 |
±0.0% |
| g.s.GraphQLAppliedDirective |
+1.3% 🟢 |
±0.0% |
+2.1% 🟢 |
| g.s.GraphQLAppliedDirectiveArgument |
+0.9% 🟢 |
±0.0% |
+2.0% 🟢 |
| g.s.GraphQLArgument |
+0.2% 🟢 |
±0.0% |
+0.4% 🟢 |
| g.s.GraphQLDirective |
+0.2% 🟢 |
±0.0% |
+0.9% 🟢 |
| g.s.GraphQLEnumType |
+0.3% 🟢 |
±0.0% |
+1.0% 🟢 |
| g.s.GraphQLEnumValueDefinition |
+0.2% 🟢 |
±0.0% |
+0.6% 🟢 |
| g.s.GraphQLFieldDefinition |
+0.1% 🟢 |
±0.0% |
+0.2% 🟢 |
| g.s.GraphQLInputObjectField |
+0.1% 🟢 |
±0.0% |
+0.2% 🟢 |
| g.s.GraphQLInputObjectType |
+0.2% 🟢 |
±0.0% |
+0.6% 🟢 |
| g.s.GraphQLInterfaceType |
+0.3% 🟢 |
±0.0% |
+0.9% 🟢 |
| g.s.GraphQLList |
+0.8% 🟢 |
±0.0% |
+1.2% 🟢 |
| g.s.GraphQLNonNull |
-2.4% 🔴 |
±0.0% |
-5.4% 🔴 |
| g.s.GraphQLObjectType |
+0.3% 🟢 |
±0.0% |
+0.7% 🟢 |
| g.s.GraphQLScalarType |
+0.4% 🟢 |
±0.0% |
+1.0% 🟢 |
| g.s.GraphqlTypeComparatorEnvironment |
-9.5% 🔴 |
+60.0% 🟢 |
±0.0% |
| g.s.GraphQLUnionType |
+0.1% 🟢 |
±0.0% |
+0.5% 🟢 |
| g.s.i.e.BaseError |
-14.1% 🔴 |
±0.0% |
-16.7% 🔴 |
| g.s.i.TypeInfo |
+1.2% 🟢 |
-2.6% 🔴 |
+1.4% 🟢 |
g.s.PropertyFetchingImpl $CacheKey |
-11.8% 🔴 |
+50.0% 🟢 |
±0.0% |
| g.s.v.SchemaValidationError |
+6.1% 🟢 |
+50.0% 🟢 |
+8.3% 🟢 |
| g.SerializationError |
-11.3% 🔴 |
±0.0% |
-14.1% 🔴 |
| g.TypeMismatchError |
-14.3% 🔴 |
±0.0% |
-22.2% 🔴 |
| g.UnresolvedTypeError |
-9.7% 🔴 |
±0.0% |
-15.0% 🔴 |
| g.u.Breadcrumb |
-31.4% 🔴 |
±0.0% |
-25.0% 🔴 |
| g.u.NodeLocation |
-24.6% 🔴 |
+50.0% 🟢 |
-8.3% 🔴 |
g.v.OperationValidator $FieldAndType |
-6.4% 🔴 |
+50.0% 🟢 |
+25.0% 🟢 |
FieldComplexityEnvironment — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
QueryVisitorFieldEnvironmentImpl — method details
| Method |
Line |
Branch |
| equals new |
100.0% |
50.0% |
| hashCode new |
100.0% |
— |
QueryVisitorFragmentDefinitionEnvironmentImpl — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
QueryVisitorFragmentSpreadEnvironmentImpl — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
QueryVisitorInlineFragmentEnvironmentImpl — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
ImmutableMapWithNullValues — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
DataFetcherResult — method details
| Method |
Line |
Branch |
| equals new |
85.7% |
83.3% |
| hashCode new |
100.0% |
— |
ExecutionId — method details
| Method |
Line |
Branch |
| equals new |
100.0% |
50.0% |
| hashCode new |
0.0% |
— |
MergedField — method details
| Method |
Line |
Branch |
| equals new |
83.3% |
66.7% |
| hashCode new |
100.0% |
— |
MergedField.MultiMergedField — method details
| Method |
Line |
Branch |
| equals new |
33.3% |
16.7% |
| hashCode new |
100.0% |
— |
NonNullableFieldWasNullError — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
ResultPath — method details
| Method |
Line |
Branch |
| equals new |
83.3% |
68.8% |
| hashCode new |
100.0% |
100.0% |
GraphQLContext — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
IncrementalPayload — method details
| Method |
Line |
Branch |
| hashCode new |
100.0% |
— |
| equals new |
77.8% |
64.3% |
IgnoredChar — method details
| Method |
Line |
Branch |
| equals new |
71.4% |
50.0% |
| hashCode new |
0.0% |
— |
SourceLocation — method details
| Method |
Line |
Branch |
| equals new |
70.0% |
60.0% |
| hashCode new |
100.0% |
— |
ExecutableNormalizedOperationToAstCompiler.ExecutionFragmentDetails — method details
| Method |
Line |
Branch |
| equals new |
66.7% |
50.0% |
| hashCode new |
100.0% |
— |
NormalizedInputValue — method details
| Method |
Line |
Branch |
| equals new |
75.0% |
55.6% |
| hashCode new |
0.0% |
— |
DefaultEdge — method details
| Method |
Line |
Branch |
| equals new |
66.7% |
70.0% |
| hashCode new |
100.0% |
— |
InvalidCursorException — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
EditOperation — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
FieldCoordinates — method details
| Method |
Line |
Branch |
| equals new |
71.4% |
70.0% |
| hashCode new |
100.0% |
— |
GraphQLNonNull — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
100.0% |
— |
GraphqlTypeComparatorEnvironment — method details
| Method |
Line |
Branch |
| equals new |
66.7% |
60.0% |
| hashCode new |
100.0% |
— |
BaseError — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
TypeInfo — method details
| Method |
Line |
Branch |
| equals new |
100.0% |
75.0% |
| hashCode new |
100.0% |
— |
PropertyFetchingImpl.CacheKey — method details
| Method |
Line |
Branch |
| equals new |
66.7% |
50.0% |
| hashCode new |
100.0% |
— |
SerializationError — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
TypeMismatchError — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
UnresolvedTypeError — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
— |
| hashCode new |
0.0% |
— |
Breadcrumb — method details
| Method |
Line |
Branch |
| equals new |
0.0% |
0.0% |
| hashCode new |
0.0% |
— |
NodeLocation — method details
| Method |
Line |
Branch |
| equals new |
71.4% |
50.0% |
| hashCode new |
0.0% |
— |
OperationValidator.FieldAndType — method details
| Method |
Line |
Branch |
| equals new |
66.7% |
50.0% |
| hashCode new |
100.0% |
— |
Full HTML report: build artifact jacoco-html-report
Updated: 2026-03-18 00:18:20 UTC
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jacocoTestReport was only including execution data from the JUnit `test`
task. The `testng` task also produces a JaCoCo .exec file but it was
never merged into the report, causing code exercised only by TestNG
tests to show zero coverage.
Add `testng` to dependsOn and set executionData to include all .exec
files from the jacoco output directory.
https://claude.ai/code/session_01XDZqTUKLBoSJpGPGx9Amxg
The markGeneratedEqualsHashCode task copied class files and then modified
them with ASM to add @generated annotations on equals/hashCode methods.
This changed the bytecode CRC64 checksums, so JaCoCo could not correlate
its execution data (recorded against the original classes) with the
modified copies. Result: 61 classes with equals/hashCode showed ZERO
coverage across all metrics — not just on equals/hashCode, but on every
line, branch, and method in the class.
Fix by pointing classDirectories back at the original classes/java/main
directory and removing the markGeneratedEqualsHashCode task entirely.
The small trade-off is that equals/hashCode methods now appear in
coverage metrics, but all 61 affected classes regain their full coverage.
https://claude.ai/code/session_01XDZqTUKLBoSJpGPGx9Amxg
|
I have to look more closely at this - so far only a quick Claude attempt
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.