44import graphql .GraphQLError ;
55import graphql .Internal ;
66
7- import java .util .ArrayList ;
87import java .util .List ;
98import java .util .function .Consumer ;
109
@@ -13,12 +12,12 @@ public class FetchedValue {
1312 private final Object fetchedValue ;
1413 private final Object rawFetchedValue ;
1514 private final Object localContext ;
16- private final ImmutableList <GraphQLError > errors ;
15+ private final List <GraphQLError > errors ;
1716
1817 private FetchedValue (Object fetchedValue , Object rawFetchedValue , List <GraphQLError > errors , Object localContext ) {
1918 this .fetchedValue = fetchedValue ;
2019 this .rawFetchedValue = rawFetchedValue ;
21- this .errors = ImmutableList . copyOf ( errors ) ;
20+ this .errors = errors ;
2221 this .localContext = localContext ;
2322 }
2423
@@ -75,7 +74,7 @@ public static class Builder {
7574 private Object fetchedValue ;
7675 private Object rawFetchedValue ;
7776 private Object localContext ;
78- private List <GraphQLError > errors = new ArrayList <> ();
77+ private List <GraphQLError > errors = ImmutableList . of ();
7978
8079 public Builder fetchedValue (Object fetchedValue ) {
8180 this .fetchedValue = fetchedValue ;
@@ -93,7 +92,7 @@ public Builder localContext(Object localContext) {
9392 }
9493
9594 public Builder errors (List <GraphQLError > errors ) {
96- this .errors = errors ;
95+ this .errors = ImmutableList . copyOf ( errors ) ;
9796 return this ;
9897 }
9998
0 commit comments