We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getDeclarablesByType()
1 parent 603e6c8 commit 0e25d79Copy full SHA for 0e25d79
spring-amqp/src/main/java/org/springframework/amqp/core/Declarables.java
@@ -1,5 +1,5 @@
1
/*
2
- * Copyright 2018-2021 the original author or authors.
+ * Copyright 2018-2024 the original author or authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ public Collection<Declarable> getDeclarables() {
59
* @return the filtered list.
60
* @since 2.2
61
*/
62
- public <T> List<T> getDeclarablesByType(Class<T> type) {
+ public <T extends Declarable> List<T> getDeclarablesByType(Class<? extends T> type) {
63
return this.declarables.stream()
64
.filter(type::isInstance)
65
.map(type::cast)
0 commit comments