@ -16,6 +16,7 @@
@@ -16,6 +16,7 @@
package org.springframework.context.event ;
import java.io.Serializable ;
import java.lang.annotation.ElementType ;
import java.lang.annotation.Retention ;
import java.lang.annotation.RetentionPolicy ;
@ -105,8 +106,9 @@ class AnnotationDrivenEventListenerTests {
@@ -105,8 +106,9 @@ class AnnotationDrivenEventListenerTests {
this . eventCollector . assertTotalEventsCount ( 1 ) ;
this . eventCollector . clear ( ) ;
this . context . publishEvent ( event ) ;
this . eventCollector . assertEvent ( listener , event ) ;
TestEvent otherEvent = new TestEvent ( this , Integer . valueOf ( 1 ) ) ;
this . context . publishEvent ( otherEvent ) ;
this . eventCollector . assertEvent ( listener , otherEvent ) ;
this . eventCollector . assertTotalEventsCount ( 1 ) ;
context . getBean ( ApplicationEventMulticaster . class ) . removeApplicationListeners ( l - >
@ -742,6 +744,11 @@ class AnnotationDrivenEventListenerTests {
@@ -742,6 +744,11 @@ class AnnotationDrivenEventListenerTests {
public void handleString ( String content ) {
collectEvent ( content ) ;
}
@EventListener ( { Boolean . class , Integer . class } )
public void handleBooleanOrInteger ( Serializable content ) {
collectEvent ( content ) ;
}
}
@ -1009,6 +1016,8 @@ class AnnotationDrivenEventListenerTests {
@@ -1009,6 +1016,8 @@ class AnnotationDrivenEventListenerTests {
void handleString ( String payload ) ;
void handleBooleanOrInteger ( Serializable content ) ;
void handleTimestamp ( Long timestamp ) ;
void handleRatio ( Double ratio ) ;
@ -1031,6 +1040,12 @@ class AnnotationDrivenEventListenerTests {
@@ -1031,6 +1040,12 @@ class AnnotationDrivenEventListenerTests {
super . handleString ( payload ) ;
}
@EventListener ( { Boolean . class , Integer . class } )
@Override
public void handleBooleanOrInteger ( Serializable content ) {
super . handleBooleanOrInteger ( content ) ;
}
@ConditionalEvent ( "#root.event.timestamp > #p0" )
@Override
public void handleTimestamp ( Long timestamp ) {