Skip to content

Commit a079d44

Browse files
committed
Polishing
See gh-788
1 parent 2539d95 commit a079d44

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-graphql/src/main/java/org/springframework/graphql/execution/DefaultBatchLoaderRegistry.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,16 @@ private String initName() {
176176

177177
private Supplier<DataLoaderOptions> initOptionsSupplier() {
178178

179-
Supplier<DataLoaderOptions> optionsSupplier = (this.options != null ?
180-
() -> this.options : DefaultBatchLoaderRegistry.this.defaultOptionsSupplier);
179+
Supplier<DataLoaderOptions> optionsSupplier = () ->
180+
new DataLoaderOptions(this.options != null ?
181+
this.options : DefaultBatchLoaderRegistry.this.defaultOptionsSupplier.get());
181182

182183
if (this.optionsConsumer == null) {
183184
return optionsSupplier;
184185
}
185186

186187
return () -> {
187-
DataLoaderOptions options = new DataLoaderOptions(optionsSupplier.get());
188+
DataLoaderOptions options = optionsSupplier.get();
188189
this.optionsConsumer.accept(options);
189190
return options;
190191
};

0 commit comments

Comments
 (0)