Skip to content

Commit f583eb3

Browse files
committed
Fix deprecation warnings for Spring Data ClassTypeInformation
1 parent 3d11351 commit f583eb3

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

spring-graphql/src/main/java/org/springframework/graphql/data/query/QueryByExampleDataFetcher.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.springframework.data.repository.query.FluentQuery;
3939
import org.springframework.data.repository.query.QueryByExampleExecutor;
4040
import org.springframework.data.repository.query.ReactiveQueryByExampleExecutor;
41-
import org.springframework.data.util.ClassTypeInformation;
4241
import org.springframework.data.util.TypeInformation;
4342
import org.springframework.graphql.data.GraphQlArgumentBinder;
4443
import org.springframework.graphql.data.GraphQlRepository;
@@ -246,18 +245,18 @@ public static class Builder<T, R> {
246245

247246
private final QueryByExampleExecutor<T> executor;
248247

249-
private final ClassTypeInformation<T> domainType;
248+
private final TypeInformation<T> domainType;
250249

251250
private final Class<R> resultType;
252251

253252
private final Sort sort;
254253

255254
@SuppressWarnings("unchecked")
256255
Builder(QueryByExampleExecutor<T> executor, Class<R> domainType) {
257-
this(executor, ClassTypeInformation.from((Class<T>) domainType), domainType, Sort.unsorted());
256+
this(executor, TypeInformation.of((Class<T>) domainType), domainType, Sort.unsorted());
258257
}
259258

260-
Builder(QueryByExampleExecutor<T> executor, ClassTypeInformation<T> domainType, Class<R> resultType, Sort sort) {
259+
Builder(QueryByExampleExecutor<T> executor, TypeInformation<T> domainType, Class<R> resultType, Sort sort) {
261260
this.executor = executor;
262261
this.domainType = domainType;
263262
this.resultType = resultType;
@@ -326,7 +325,7 @@ public static class ReactiveBuilder<T, R> {
326325

327326
@SuppressWarnings("unchecked")
328327
ReactiveBuilder(ReactiveQueryByExampleExecutor<T> executor, Class<R> domainType) {
329-
this(executor, ClassTypeInformation.from((Class<T>) domainType), domainType, Sort.unsorted());
328+
this(executor, TypeInformation.of((Class<T>) domainType), domainType, Sort.unsorted());
330329
}
331330

332331
ReactiveBuilder(

spring-graphql/src/main/java/org/springframework/graphql/data/query/QuerydslDataFetcher.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import org.springframework.data.querydsl.binding.QuerydslPredicateBuilder;
4545
import org.springframework.data.repository.query.FluentQuery;
4646
import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery;
47-
import org.springframework.data.util.ClassTypeInformation;
4847
import org.springframework.data.util.TypeInformation;
4948
import org.springframework.graphql.data.GraphQlRepository;
5049
import org.springframework.graphql.execution.RuntimeWiringConfigurer;
@@ -289,7 +288,7 @@ public static class Builder<T, R> {
289288

290289
private final QuerydslPredicateExecutor<T> executor;
291290

292-
private final ClassTypeInformation<T> domainType;
291+
private final TypeInformation<T> domainType;
293292

294293
private final Class<R> resultType;
295294

@@ -300,13 +299,13 @@ public static class Builder<T, R> {
300299
@SuppressWarnings("unchecked")
301300
Builder(QuerydslPredicateExecutor<T> executor, Class<R> domainType) {
302301
this(executor,
303-
ClassTypeInformation.from((Class<T>) domainType),
302+
TypeInformation.of((Class<T>) domainType),
304303
domainType,
305304
Sort.unsorted(),
306305
NO_OP_BINDER_CUSTOMIZER);
307306
}
308307

309-
Builder(QuerydslPredicateExecutor<T> executor, ClassTypeInformation<T> domainType,
308+
Builder(QuerydslPredicateExecutor<T> executor, TypeInformation<T> domainType,
310309
Class<R> resultType, Sort sort, QuerydslBinderCustomizer<? extends EntityPath<T>> customizer) {
311310

312311
this.executor = executor;
@@ -400,7 +399,7 @@ public static class ReactiveBuilder<T, R> {
400399
@SuppressWarnings("unchecked")
401400
ReactiveBuilder(ReactiveQuerydslPredicateExecutor<T> executor, Class<R> domainType) {
402401
this(executor,
403-
ClassTypeInformation.from((Class<T>) domainType),
402+
TypeInformation.of((Class<T>) domainType),
404403
domainType,
405404
Sort.unsorted(),
406405
NO_OP_BINDER_CUSTOMIZER);

0 commit comments

Comments
 (0)