File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
package org.utbot.framework.plugin.api
10
10
11
+ import mu.KotlinLogging
11
12
import org.utbot.common.FileUtil
12
13
import org.utbot.common.isDefaultValue
13
14
import org.utbot.common.withToStringThreadLocalReentrancyGuard
@@ -1270,6 +1271,10 @@ class SpringApplicationContext(
1270
1271
private val shouldUseImplementors : Boolean ,
1271
1272
): ApplicationContext(mockInstalled, staticsMockingIsConfigured) {
1272
1273
1274
+ companion object {
1275
+ private val logger = KotlinLogging .logger {}
1276
+ }
1277
+
1273
1278
private var areInjectedClassesInitialized : Boolean = false
1274
1279
1275
1280
// Classes representing concrete types that are actually used in Spring application
@@ -1283,10 +1288,15 @@ class SpringApplicationContext(
1283
1288
! beanClass.isLocalClass && (! beanClass.isMemberClass || beanClass.isStatic)) {
1284
1289
springInjectedClassesStorage + = beanClass.id
1285
1290
}
1286
- } catch (e: ClassNotFoundException ) {
1291
+ } catch (e: Throwable ) {
1287
1292
// For some Spring beans (e.g. with anonymous classes)
1288
1293
// it is possible to have problems with classes loading.
1289
- continue
1294
+ when (e) {
1295
+ is ClassNotFoundException , is NoClassDefFoundError , is IllegalAccessError ->
1296
+ logger.warn { " Failed to load bean class for $beanFqn (${e.message} )" }
1297
+
1298
+ else -> throw e
1299
+ }
1290
1300
}
1291
1301
}
1292
1302
You can’t perform that action at this time.
0 commit comments