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

@@ -41,6 +41,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell
* @author Ngoc Nhan
*
* @see ApplicationEventMulticaster
* @see ExpressionMessageProducerSupport
@@ -80,7 +81,7 @@ public class ApplicationEventListeningMessageProducer extends ExpressionMessageP
eventSet.add(ResolvableType.forClass(eventType));
}
}
this.eventTypes = (eventSet.size() > 0 ? eventSet : null);
this.eventTypes = (!eventSet.isEmpty() ? eventSet : null);
if (this.applicationEventMulticaster != null) {
this.applicationEventMulticaster.addApplicationListener(this);