mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Apply "instanceof pattern matching" in additional locations
Closes gh-27696
This commit is contained in:
+1
-2
@@ -76,8 +76,7 @@ public abstract class AbstractConfigurableMBeanInfoAssembler extends AbstractRef
|
||||
if (mapValue instanceof ManagedNotification mn) {
|
||||
return new ModelMBeanNotificationInfo[] {JmxMetadataUtils.convertToModelMBeanNotificationInfo(mn)};
|
||||
}
|
||||
else if (mapValue instanceof Collection) {
|
||||
Collection<?> col = (Collection<?>) mapValue;
|
||||
else if (mapValue instanceof Collection<?> col) {
|
||||
List<ModelMBeanNotificationInfo> result = new ArrayList<>();
|
||||
for (Object colValue : col) {
|
||||
if (!(colValue instanceof ManagedNotification mn)) {
|
||||
|
||||
Reference in New Issue
Block a user