Modernize code for diamond, isEmpty & pattern matching

This commit is contained in:
Tran Ngoc Nhan
2024-09-24 01:42:38 +07:00
committed by GitHub
parent 40faaa0c15
commit fc377126de
107 changed files with 550 additions and 454 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 the original author or authors.
* Copyright 2022-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,6 +60,7 @@ import org.springframework.util.Assert;
* @author Soby Chacko
* @author Artem Bilan
* @author Filippo Balicchia
* @author Ngoc Nhan
*
* @since 6.0
*/
@@ -180,11 +181,11 @@ public class CassandraMessageHandler extends AbstractReplyProducingMessageHandle
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
TypeLocator typeLocator = this.evaluationContext.getTypeLocator();
if (typeLocator instanceof StandardTypeLocator) {
if (typeLocator instanceof StandardTypeLocator standardTypeLocator) {
/*
* Register the Cassandra Query DSL package, so they don't need a FQCN for QueryBuilder, for example.
*/
((StandardTypeLocator) typeLocator).registerImport(QueryBuilder.class.getPackage().getName());
standardTypeLocator.registerImport(QueryBuilder.class.getPackage().getName());
}
}