Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkron committed Jun 8, 2021
1 parent 3745d17 commit f648de9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ class GrailsApplicationPostProcessor implements BeanDefinitionRegistryPostProces

@SuppressWarnings("GrMethodMayBeStatic")
private void loadPluginConfigurationsToMicronautContext(ConfigurableApplicationContext applicationContext) {
String[] beanNames = applicationContext.getBeanNamesForType(GrailsPluginManager)
if (beanNames.length == 0) {
// do not continue if PluginManager is not available
return
}

GrailsPluginManager pluginManager = applicationContext.getBean(GrailsPluginManager)
ConfigurableApplicationContext parentApplicationContext = (ConfigurableApplicationContext) applicationContext.parent
ConfigurableEnvironment parentContextEnv = parentApplicationContext.getEnvironment()
Expand All @@ -314,5 +320,4 @@ class GrailsApplicationPostProcessor implements BeanDefinitionRegistryPostProces
applicationContext.setParent(parentApplicationContext)
}
}

}

0 comments on commit f648de9

Please sign in to comment.