Polish
Issue: SPR-9439
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
/*
|
||||
* Copyright 2002-2012 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.springframework.beans.TestBean;
|
||||
@@ -136,6 +153,7 @@ public abstract class AbstractApplicationContextTests extends AbstractListableBe
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class MyEvent extends ApplicationEvent {
|
||||
|
||||
public MyEvent(Object source) {
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package org.springframework.web.context;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.sameInstance;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
@@ -36,6 +33,10 @@ import org.springframework.context.TestListener;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
import org.springframework.web.context.support.XmlWebApplicationContext;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
@@ -53,6 +54,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes
|
||||
root.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() {
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
||||
beanFactory.addBeanPostProcessor(new BeanPostProcessor() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object postProcessBeforeInitialization(Object bean, String name) throws BeansException {
|
||||
if (bean instanceof TestBean) {
|
||||
((TestBean) bean).getFriends().add("myFriend");
|
||||
|
||||
Reference in New Issue
Block a user