Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfredley committed Sep 26, 2024
1 parent 53cdc80 commit 4e745bb
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ class GrailsApplicationBuilder {
def beanFactory = context.getBeanFactory()
def beanExcludes = [ConversionService, Environment, PropertyResolver, ConfigurableEnvironment]

Class<?> objectMapper
try {
objectMapper = ClassUtils.forName('com.fasterxml.jackson.databind.ObjectMapper', context.getClassLoader())
} catch (ignored) {
}
if (objectMapper) {
Class<?> objectMapper = ClassUtils.forName('com.fasterxml.jackson.databind.ObjectMapper', context.classLoader)
beanExcludes.add(objectMapper)
} catch (ignored) {
// ObjectMapper not found on classpath
}

(beanFactory as DefaultListableBeanFactory).with {
Expand Down

0 comments on commit 4e745bb

Please sign in to comment.