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 88
99package org.utbot.framework.plugin.api
1010
11+ import mu.KotlinLogging
1112import org.utbot.common.FileUtil
1213import org.utbot.common.isDefaultValue
1314import org.utbot.common.withToStringThreadLocalReentrancyGuard
@@ -1270,6 +1271,10 @@ class SpringApplicationContext(
12701271 private val shouldUseImplementors : Boolean ,
12711272): ApplicationContext(mockInstalled, staticsMockingIsConfigured) {
12721273
1274+ companion object {
1275+ private val logger = KotlinLogging .logger {}
1276+ }
1277+
12731278 private var areInjectedClassesInitialized : Boolean = false
12741279
12751280 // Classes representing concrete types that are actually used in Spring application
@@ -1283,10 +1288,15 @@ class SpringApplicationContext(
12831288 ! beanClass.isLocalClass && (! beanClass.isMemberClass || beanClass.isStatic)) {
12841289 springInjectedClassesStorage + = beanClass.id
12851290 }
1286- } catch (e: ClassNotFoundException ) {
1291+ } catch (e: Throwable ) {
12871292 // For some Spring beans (e.g. with anonymous classes)
12881293 // 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+ }
12901300 }
12911301 }
12921302
You can’t perform that action at this time.
0 commit comments