Skip to content

Commit 1c58511

Browse files
committed
Polishing
1 parent 8de0fad commit 1c58511

File tree

8 files changed

+89
-85
lines changed

8 files changed

+89
-85
lines changed

spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,17 +34,19 @@
3434
* @author Chris Beams
3535
* @since 07.01.2005
3636
*/
37-
public class LazyInitTargetSourceTests {
37+
class LazyInitTargetSourceTests {
3838

3939
private static final Class<?> CLASS = LazyInitTargetSourceTests.class;
4040

4141
private static final Resource SINGLETON_CONTEXT = qualifiedResource(CLASS, "singleton.xml");
4242
private static final Resource CUSTOM_TARGET_CONTEXT = qualifiedResource(CLASS, "customTarget.xml");
4343
private static final Resource FACTORY_BEAN_CONTEXT = qualifiedResource(CLASS, "factoryBean.xml");
4444

45+
private final DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
46+
47+
4548
@Test
46-
public void testLazyInitSingletonTargetSource() {
47-
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
49+
void lazyInitSingletonTargetSource() {
4850
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(SINGLETON_CONTEXT);
4951
bf.preInstantiateSingletons();
5052

@@ -55,8 +57,7 @@ public void testLazyInitSingletonTargetSource() {
5557
}
5658

5759
@Test
58-
public void testCustomLazyInitSingletonTargetSource() {
59-
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
60+
void customLazyInitSingletonTargetSource() {
6061
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(CUSTOM_TARGET_CONTEXT);
6162
bf.preInstantiateSingletons();
6263

@@ -67,8 +68,8 @@ public void testCustomLazyInitSingletonTargetSource() {
6768
}
6869

6970
@Test
70-
public void testLazyInitFactoryBeanTargetSource() {
71-
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
71+
@SuppressWarnings("unchecked")
72+
void lazyInitFactoryBeanTargetSource() {
7273
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(FACTORY_BEAN_CONTEXT);
7374
bf.preInstantiateSingletons();
7475

@@ -85,7 +86,7 @@ public void testLazyInitFactoryBeanTargetSource() {
8586

8687

8788
@SuppressWarnings("serial")
88-
public static class CustomLazyInitTargetSource extends LazyInitTargetSource {
89+
static class CustomLazyInitTargetSource extends LazyInitTargetSource {
8990

9091
@Override
9192
protected void postProcessTargetObject(Object targetObject) {

spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ void setPropertyIntermediatePropertyIsNullWithAutoGrow() {
406406
}
407407

408408
@Test
409+
@SuppressWarnings("unchecked")
409410
void setPropertyIntermediateListIsNullWithAutoGrow() {
410411
Foo target = new Foo();
411412
AbstractPropertyAccessor accessor = createAccessor(target);

spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3416,7 +3416,7 @@ private static class LowPriorityTestBean extends TestBean {
34163416
}
34173417

34183418

3419-
private static class PriorityTestBeanFactory {
3419+
static class PriorityTestBeanFactory {
34203420

34213421
public static LowPriorityTestBean lowPriorityTestBean() {
34223422
return new LowPriorityTestBean();

0 commit comments

Comments
 (0)