Skip to content

Commit 490b78a

Browse files
committed
Polishing
1 parent 1ab9e2c commit 490b78a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ public <T> T createBean(Class<T> beanClass) throws BeansException {
300300
RootBeanDefinition bd = new RootBeanDefinition(beanClass);
301301
bd.setScope(SCOPE_PROTOTYPE);
302302
bd.allowCaching = ClassUtils.isCacheSafe(beanClass, getBeanClassLoader());
303-
// For the nullability warning, see the elaboration in AbstractBeanFactory.doGetBean;
304-
// in short: This is never going to be null unless user-declared code enforces null.
305303
return (T) createBean(beanClass.getName(), bd, null);
306304
}
307305

@@ -335,8 +333,6 @@ public Object configureBean(Object existingBean, String beanName) throws BeansEx
335333
BeanWrapper bw = new BeanWrapperImpl(existingBean);
336334
initBeanWrapper(bw);
337335
populateBean(beanName, bd, bw);
338-
// For the nullability warning, see the elaboration in AbstractBeanFactory.doGetBean;
339-
// in short: This is never going to be null unless user-declared code enforces null.
340336
return initializeBean(beanName, existingBean, bd);
341337
}
342338

@@ -356,8 +352,6 @@ public Object createBean(Class<?> beanClass, int autowireMode, boolean dependenc
356352
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
357353
RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck);
358354
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
359-
// For the nullability warning, see the elaboration in AbstractBeanFactory.doGetBean;
360-
// in short: This is never going to be null unless user-declared code enforces null.
361355
return createBean(beanClass.getName(), bd, null);
362356
}
363357

spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -93,7 +93,7 @@ public void setDataSource(DataSource dataSource) {
9393

9494

9595
@Before
96-
public void setUp() {
96+
public void setup() {
9797
if (applicationContext == null) {
9898
applicationContext = new ClassPathXmlApplicationContext(getConfigLocations());
9999
}
@@ -109,7 +109,7 @@ protected String[] getConfigLocations() {
109109
}
110110

111111
@After
112-
public void tearDown() throws Exception {
112+
public void cleanup() {
113113
if (this.transactionStatus != null && !this.transactionStatus.isCompleted()) {
114114
endTransaction();
115115
}

0 commit comments

Comments
 (0)