[bs-73] Tweak algorithm for detecting anonymous classes
@Bean definitions in Groovy that contain closures have the bean name in the class name. Ugh. Added regex match to catch that. [#48718891]
This commit is contained in:
@@ -163,7 +163,7 @@ class BeanDefinitionLoader {
|
||||
}
|
||||
// Nested anonymous classes are not eligible for registration, nor are groovy
|
||||
// closures
|
||||
if (type.isAnonymousClass() || type.getName().contains("$_closure")
|
||||
if (type.isAnonymousClass() || type.getName().matches(".*\\$_.*closure.*")
|
||||
|| type.getConstructors() == null || type.getConstructors().length == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user