diff --git a/spring-beans/spring-beans.gradle b/spring-beans/spring-beans.gradle index 9c4d0af79e..3c5d34179e 100644 --- a/spring-beans/spring-beans.gradle +++ b/spring-beans/spring-beans.gradle @@ -23,8 +23,7 @@ sourceSets { } compileGroovy { - // Groovy generates Java code with "new Boolean" usage which is deprecated on JDK 17 - // options.compilerArgs += "-Werror" + options.compilerArgs += "-Werror" } // This module also builds Kotlin code and the compileKotlin task naturally depends on diff --git a/spring-beans/src/main/groovy/org/springframework/beans/factory/groovy/GroovyDynamicElementReader.groovy b/spring-beans/src/main/groovy/org/springframework/beans/factory/groovy/GroovyDynamicElementReader.groovy index d017121694..8157450773 100644 --- a/spring-beans/src/main/groovy/org/springframework/beans/factory/groovy/GroovyDynamicElementReader.groovy +++ b/spring-beans/src/main/groovy/org/springframework/beans/factory/groovy/GroovyDynamicElementReader.groovy @@ -40,7 +40,7 @@ class GroovyDynamicElementReader extends GroovyObjectSupport { private final GroovyBeanDefinitionWrapper beanDefinition - protected final boolean decorating; + protected final Boolean decorating; private boolean callAfterInvocation = true