EventListenerMethodProcessor skips annotation search on java classes
Closes gh-22564
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -142,7 +142,10 @@ public class EventListenerMethodProcessor
|
||||
}
|
||||
|
||||
private void processBean(final String beanName, final Class<?> targetType) {
|
||||
if (!this.nonAnnotatedClasses.contains(targetType) && !isSpringContainerClass(targetType)) {
|
||||
if (!this.nonAnnotatedClasses.contains(targetType) &&
|
||||
!targetType.getName().startsWith("java") &&
|
||||
!isSpringContainerClass(targetType)) {
|
||||
|
||||
Map<Method, EventListener> annotatedMethods = null;
|
||||
try {
|
||||
annotatedMethods = MethodIntrospector.selectMethods(targetType,
|
||||
@@ -155,6 +158,7 @@ public class EventListenerMethodProcessor
|
||||
logger.debug("Could not resolve methods for bean with name '" + beanName + "'", ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(annotatedMethods)) {
|
||||
this.nonAnnotatedClasses.add(targetType);
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user