Avoid use of var declarations
See gh-27945.
This commit is contained in:
@@ -33,11 +33,9 @@ class GroovyApplicationContextDynamicBeanPropertyTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void accessDynamicBeanProperties() {
|
void accessDynamicBeanProperties() {
|
||||||
var ctx = new GenericGroovyApplicationContext();
|
GenericGroovyApplicationContext ctx = new GenericGroovyApplicationContext("org/springframework/context/groovy/applicationContext.groovy");
|
||||||
ctx.getReader().loadBeanDefinitions("org/springframework/context/groovy/applicationContext.groovy");
|
|
||||||
ctx.refresh();
|
|
||||||
|
|
||||||
var framework = ctx.getProperty("framework");
|
Object framework = ctx.getBean("framework");
|
||||||
assertThat(framework).as("could not find framework bean").isNotNull();
|
assertThat(framework).as("could not find framework bean").isNotNull();
|
||||||
assertThat(framework).isEqualTo("Grails");
|
assertThat(framework).isEqualTo("Grails");
|
||||||
|
|
||||||
@@ -45,13 +43,11 @@ class GroovyApplicationContextDynamicBeanPropertyTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void accessingNonExistentBeanViaDynamicProperty() {
|
void accessNonExistentBeanViaDynamicProperty() {
|
||||||
var ctx = new GenericGroovyApplicationContext();
|
GenericGroovyApplicationContext ctx = new GenericGroovyApplicationContext("org/springframework/context/groovy/applicationContext.groovy");
|
||||||
ctx.getReader().loadBeanDefinitions("org/springframework/context/groovy/applicationContext.groovy");
|
|
||||||
ctx.refresh();
|
|
||||||
|
|
||||||
assertThatExceptionOfType(NoSuchBeanDefinitionException.class)
|
assertThatExceptionOfType(NoSuchBeanDefinitionException.class)
|
||||||
.isThrownBy(() -> ctx.getProperty("someNonExistentBean"))
|
.isThrownBy(() -> ctx.getBean("someNonExistentBean"))
|
||||||
.withMessage("No bean named 'someNonExistentBean' available");
|
.withMessage("No bean named 'someNonExistentBean' available");
|
||||||
|
|
||||||
ctx.close();
|
ctx.close();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void importSpringXml() {
|
void importSpringXml() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
beans {
|
beans {
|
||||||
@@ -62,7 +62,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void importBeansFromGroovy() {
|
void importBeansFromGroovy() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
beans {
|
beans {
|
||||||
@@ -75,7 +75,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void singletonPropertyOnBeanDefinition() {
|
void singletonPropertyOnBeanDefinition() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy;
|
package org.springframework.context.groovy;
|
||||||
@@ -97,7 +97,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void inheritPropertiesFromAbstractBean() {
|
void inheritPropertiesFromAbstractBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy;
|
package org.springframework.context.groovy;
|
||||||
@@ -124,7 +124,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void contextComponentScanSpringTag() {
|
void contextComponentScanSpringTag() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
beans {
|
beans {
|
||||||
@@ -139,7 +139,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void useSpringNamespaceAsMethod() {
|
void useSpringNamespaceAsMethod() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy;
|
package org.springframework.context.groovy;
|
||||||
@@ -175,7 +175,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
void useTwoSpringNamespaces() {
|
void useTwoSpringNamespaces() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
TestScope scope = new TestScope();
|
TestScope scope = new TestScope();
|
||||||
appCtx.getBeanFactory().registerScope("test", scope);
|
appCtx.getBeanFactory().registerScope("test", scope);
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void springAopSupport() {
|
void springAopSupport() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -268,7 +268,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void springScopedProxyBean() {
|
void springScopedProxyBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
TestScope scope = new TestScope();
|
TestScope scope = new TestScope();
|
||||||
appCtx.getBeanFactory().registerScope("test", scope);
|
appCtx.getBeanFactory().registerScope("test", scope);
|
||||||
@@ -294,7 +294,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
void springNamespaceBean() {
|
void springNamespaceBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -312,7 +312,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void namedArgumentConstructor() {
|
void namedArgumentConstructor() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -332,7 +332,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void abstractBeanDefinition() {
|
void abstractBeanDefinition() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
beans {
|
beans {
|
||||||
@@ -358,7 +358,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void abstractBeanDefinitionWithClass() {
|
void abstractBeanDefinitionWithClass() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
beans {
|
beans {
|
||||||
@@ -386,7 +386,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void scopes() {
|
void scopes() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
beans {
|
beans {
|
||||||
@@ -397,8 +397,8 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
}
|
}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
var b1 = appCtx.getBean("myBean");
|
Object b1 = appCtx.getBean("myBean");
|
||||||
var b2 = appCtx.getBean("myBean");
|
Object b2 = appCtx.getBean("myBean");
|
||||||
|
|
||||||
assertThat(b1).isNotSameAs(b2);
|
assertThat(b1).isNotSameAs(b2);
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void simpleBean() {
|
void simpleBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -440,7 +440,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithParentRef() {
|
void beanWithParentRef() {
|
||||||
var parentAppCtx = new GenericApplicationContext();
|
GenericApplicationContext parentAppCtx = new GenericApplicationContext();
|
||||||
loadGroovyDsl(parentAppCtx, """
|
loadGroovyDsl(parentAppCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
beans {
|
beans {
|
||||||
@@ -453,7 +453,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
}
|
}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
var appCtx = new GenericApplicationContext(parentAppCtx);
|
GenericApplicationContext appCtx = new GenericApplicationContext(parentAppCtx);
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
beans {
|
beans {
|
||||||
@@ -471,7 +471,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void withAnonymousInnerBean() {
|
void withAnonymousInnerBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -502,7 +502,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void withUntypedAnonymousInnerBean() {
|
void withUntypedAnonymousInnerBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -533,7 +533,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanReferences() {
|
void beanReferences() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -560,7 +560,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
}
|
}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
var homer = appCtx.getBean("homer");
|
Object homer = appCtx.getBean("homer");
|
||||||
Bean2 marge = (Bean2) appCtx.getBean("marge");
|
Bean2 marge = (Bean2) appCtx.getBean("marge");
|
||||||
Bean1 bart = (Bean1) appCtx.getBean("bart");
|
Bean1 bart = (Bean1) appCtx.getBean("bart");
|
||||||
Bean1 lisa = (Bean1) appCtx.getBean("lisa");
|
Bean1 lisa = (Bean1) appCtx.getBean("lisa");
|
||||||
@@ -573,7 +573,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithConstructor() {
|
void beanWithConstructor() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -596,7 +596,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithFactoryMethod() {
|
void beanWithFactoryMethod() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -618,7 +618,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithFactoryMethodUsingClosureArgs() {
|
void beanWithFactoryMethodUsingClosureArgs() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -640,7 +640,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithFactoryMethodWithConstructorArgs() {
|
void beanWithFactoryMethodWithConstructorArgs() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -672,8 +672,8 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getBeanDefinitions() {
|
void getBeanDefinitions() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
var reader = new GroovyBeanDefinitionReader(appCtx);
|
GroovyBeanDefinitionReader reader = new GroovyBeanDefinitionReader(appCtx);
|
||||||
|
|
||||||
reader.loadBeanDefinitions(new ByteArrayResource(("""
|
reader.loadBeanDefinitions(new ByteArrayResource(("""
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -700,7 +700,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithFactoryBean() {
|
void beanWithFactoryBean() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -722,7 +722,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithFactoryBeanAndMethod() {
|
void beanWithFactoryBeanAndMethod() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -742,7 +742,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadExternalBeans() {
|
void loadExternalBeans() {
|
||||||
var appCtx = new GenericGroovyApplicationContext("org/springframework/context/groovy/applicationContext.groovy");
|
GenericApplicationContext appCtx = new GenericGroovyApplicationContext("org/springframework/context/groovy/applicationContext.groovy");
|
||||||
|
|
||||||
assertThat(appCtx.containsBean("foo")).isTrue();
|
assertThat(appCtx.containsBean("foo")).isTrue();
|
||||||
assertThat(appCtx.getBean("foo")).isEqualTo("hello");
|
assertThat(appCtx.getBean("foo")).isEqualTo("hello");
|
||||||
@@ -752,9 +752,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadExternalBeansWithExplicitRefresh() {
|
void loadExternalBeansWithExplicitRefresh() {
|
||||||
var appCtx = new GenericGroovyApplicationContext();
|
GenericGroovyApplicationContext appCtx = new GenericGroovyApplicationContext("org/springframework/context/groovy/applicationContext.groovy");
|
||||||
appCtx.load("org/springframework/context/groovy/applicationContext.groovy");
|
|
||||||
appCtx.refresh();
|
|
||||||
|
|
||||||
assertThat(appCtx.containsBean("foo")).isTrue();
|
assertThat(appCtx.containsBean("foo")).isTrue();
|
||||||
assertThat(appCtx.getBean("foo")).isEqualTo("hello");
|
assertThat(appCtx.getBean("foo")).isEqualTo("hello");
|
||||||
@@ -764,7 +762,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void holyGrailWiring() {
|
void holyGrailWiring() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -783,7 +781,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void abstractBeanSpecifyingClass() {
|
void abstractBeanSpecifyingClass() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -820,7 +818,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void groovyBeanDefinitionReaderWithScript() throws Exception {
|
void groovyBeanDefinitionReaderWithScript() throws Exception {
|
||||||
var script = """
|
String script = """
|
||||||
def appCtx = new org.springframework.context.support.GenericGroovyApplicationContext()
|
def appCtx = new org.springframework.context.support.GenericGroovyApplicationContext()
|
||||||
appCtx.reader.beans {
|
appCtx.reader.beans {
|
||||||
quest(org.springframework.context.groovy.HolyGrailQuest)
|
quest(org.springframework.context.groovy.HolyGrailQuest)
|
||||||
@@ -842,7 +840,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
// test for GRAILS-5057
|
// test for GRAILS-5057
|
||||||
@Test
|
@Test
|
||||||
void registerBeans() {
|
void registerBeans() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -870,7 +868,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void listOfBeansAsConstructorArg() {
|
void listOfBeansAsConstructorArg() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -889,7 +887,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void beanWithListAndMapConstructor() {
|
void beanWithListAndMapConstructor() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -921,7 +919,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void anonymousInnerBeanViaBeanMethod() {
|
void anonymousInnerBeanViaBeanMethod() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
@@ -953,7 +951,7 @@ class GroovyBeanDefinitionReaderTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void anonymousInnerBeanViaBeanMethodWithConstructorArgs() {
|
void anonymousInnerBeanViaBeanMethodWithConstructorArgs() {
|
||||||
var appCtx = new GenericApplicationContext();
|
GenericApplicationContext appCtx = new GenericApplicationContext();
|
||||||
|
|
||||||
loadGroovyDsl(appCtx, """
|
loadGroovyDsl(appCtx, """
|
||||||
package org.springframework.context.groovy
|
package org.springframework.context.groovy
|
||||||
|
|||||||
Reference in New Issue
Block a user