File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
src/main/java/graphql/execution/incremental Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 44import graphql .normalized .incremental .NormalizedDeferredExecution ;
55import org .jspecify .annotations .Nullable ;
66
7- import java .util .Objects ;
8-
97/**
108 * Represents details about the defer execution that can be associated with a {@link graphql.execution.MergedField}.
119 * <p>
@@ -25,17 +23,17 @@ public String getLabel() {
2523 return label ;
2624 }
2725
26+ // this class uses object identity - do not put .equals() / .hashCode() implementations on it
27+ // otherwise it will break defer handling. I have put the code just to be explicit that object identity
28+ // is needed
29+
2830 @ Override
29- public boolean equals (Object o ) {
30- if (o == null || getClass () != o .getClass ()) {
31- return false ;
32- }
33- DeferredExecution that = (DeferredExecution ) o ;
34- return Objects .equals (label , that .label );
31+ public int hashCode () {
32+ return super .hashCode ();
3533 }
3634
3735 @ Override
38- public int hashCode ( ) {
39- return Objects . hashCode ( label );
36+ public boolean equals ( Object obj ) {
37+ return super . equals ( obj );
4038 }
4139}
You can’t perform that action at this time.
0 commit comments