Skip to content

Commit 15696d4

Browse files
dondonzclaude
andcommitted
Fix missing @nullable on chainedCtx return type
chainedCtx can return null in the single-instrumentation case since it passes the mapper result through directly, and the underlying Instrumentation begin* methods are @nullable (null is the opt-out signal). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f18ec2a commit 15696d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/graphql/execution/instrumentation/ChainedInstrumentation.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public List<Instrumentation> getInstrumentations() {
6767
return instrumentations;
6868
}
6969

70-
private <T> @Nullable InstrumentationContext<T> chainedCtx(InstrumentationState state, BiFunction<Instrumentation, InstrumentationState, @Nullable InstrumentationContext<T>> mapper) {
70+
private <T> @Nullable InstrumentationContext<T> chainedCtx(InstrumentationState state, BiFunction<Instrumentation, InstrumentationState, InstrumentationContext<T>> mapper) {
7171
// if we have zero or 1 instrumentations (and 1 is the most common), then we can avoid an object allocation
7272
// of the ChainedInstrumentationContext since it won't be needed
7373
if (instrumentations.isEmpty()) {

0 commit comments

Comments
 (0)