Fix Blockhound config for micrometer-context-propagation
Since the ServiceLoader reads the files in a blocking way, Blockhound can detect these and cause java.lang.NoClassDefFoundError: Could not initialize class errors if the ServiceLoader is called from a static scope (static variable init or static block).
This commit is contained in:
@@ -93,9 +93,9 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration {
|
||||
"org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader", "loadBeanDefinitions");
|
||||
builder.allowBlockingCallsInside("org.springframework.core.type.classreading.SimpleMetadataReader",
|
||||
"getClassReader");
|
||||
builder.allowBlockingCallsInside("io.micrometer.contextpropagation.ThreadLocalAccessorLoader",
|
||||
"getThreadLocalAccessors");
|
||||
builder.allowBlockingCallsInside("io.micrometer.contextpropagation.PropagatorLoader", "getPropagatorForSet");
|
||||
|
||||
builder.allowBlockingCallsInside("io.micrometer.context.ContextRegistry", "loadContextAccessors");
|
||||
builder.allowBlockingCallsInside("io.micrometer.context.ContextRegistry", "loadThreadLocalAccessors");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user