@ -81,6 +81,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -81,6 +81,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@ -90,6 +91,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -90,6 +91,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@ -98,11 +100,40 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -98,11 +100,40 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@ -144,7 +175,6 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -144,7 +175,6 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
}
protectedvoidhandleResult(Objectresult){
Assert.notNull(this.applicationContext,"ApplicationContext must no be null.");
if(result.getClass().isArray()){
Object[]events=ObjectUtils.toObjectArray(result);
for(Objectevent:events){
@ -164,6 +194,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -164,6 +194,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
privatevoidpublishEvent(Objectevent){
if(event!=null){
Assert.notNull(this.applicationContext,"ApplicationContext must no be null");
this.applicationContext.publishEvent(event);
}
}
@ -174,41 +205,14 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -174,41 +205,14 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
}
Stringcondition=getCondition();
if(StringUtils.hasText(condition)){
Assert.notNull(this.evaluator,"Evaluator must no be null.");
@ -246,7 +250,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -246,7 +250,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
*Returnthetargetbeaninstancetouse.
*/
protectedObjectgetTargetBean(){
Assert.notNull(this.applicationContext,"ApplicationContext must no be null.");
Assert.notNull(this.applicationContext,"ApplicationContext must no be null");
@ -346,8 +350,8 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -346,8 +350,8 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
thrownewIllegalStateException("Maximum one parameter is allowed "+
"for event listener method: "+method);
thrownewIllegalStateException(
"Maximum one parameter is allowed for event listener method: "+this.method);
}
EventListenerann=getEventListener();
if(ann!=null&&ann.classes().length>0){
@ -359,13 +363,14 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
@@ -359,13 +363,14 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
}
else{
if(count==0){
thrownewIllegalStateException("Event parameter is mandatory "+
"for event listener method: "+method);
thrownewIllegalStateException(
"Event parameter is mandatory for event listener method: "+this.method);