Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifie
|
||||
* @author Chris Beams
|
||||
* @since 07.01.2005
|
||||
*/
|
||||
public class LazyInitTargetSourceTests {
|
||||
class LazyInitTargetSourceTests {
|
||||
|
||||
private static final Class<?> CLASS = LazyInitTargetSourceTests.class;
|
||||
|
||||
@@ -42,9 +42,11 @@ public class LazyInitTargetSourceTests {
|
||||
private static final Resource CUSTOM_TARGET_CONTEXT = qualifiedResource(CLASS, "customTarget.xml");
|
||||
private static final Resource FACTORY_BEAN_CONTEXT = qualifiedResource(CLASS, "factoryBean.xml");
|
||||
|
||||
private final DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
|
||||
|
||||
@Test
|
||||
public void testLazyInitSingletonTargetSource() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
void lazyInitSingletonTargetSource() {
|
||||
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(SINGLETON_CONTEXT);
|
||||
bf.preInstantiateSingletons();
|
||||
|
||||
@@ -55,8 +57,7 @@ public class LazyInitTargetSourceTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomLazyInitSingletonTargetSource() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
void customLazyInitSingletonTargetSource() {
|
||||
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(CUSTOM_TARGET_CONTEXT);
|
||||
bf.preInstantiateSingletons();
|
||||
|
||||
@@ -67,8 +68,8 @@ public class LazyInitTargetSourceTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLazyInitFactoryBeanTargetSource() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
@SuppressWarnings("unchecked")
|
||||
void lazyInitFactoryBeanTargetSource() {
|
||||
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(FACTORY_BEAN_CONTEXT);
|
||||
bf.preInstantiateSingletons();
|
||||
|
||||
@@ -85,7 +86,7 @@ public class LazyInitTargetSourceTests {
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class CustomLazyInitTargetSource extends LazyInitTargetSource {
|
||||
static class CustomLazyInitTargetSource extends LazyInitTargetSource {
|
||||
|
||||
@Override
|
||||
protected void postProcessTargetObject(Object targetObject) {
|
||||
|
||||
Reference in New Issue
Block a user