Modernize code for diamond, isEmpty & pattern matching
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user