Merge branch '3.2.x' into master

* 3.2.x:
  Exclude spring-build-src from maven publish
  Move spring-build-junit into spring-core
  Relocate MergePlugin package
  Develop a gradle plugin to add test dependencies
  Expose Gradle buildSrc for IDE support
  Fix [deprecation] compiler warnings
  Upgrade to xmlunit version 1.3
  Improve 'build' folder ignores
  Fix regression in static setter method support
  Fix SpEL JavaBean compliance for setters

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
This commit is contained in:
Chris Beams
2013-01-02 10:36:57 +01:00
184 changed files with 1893 additions and 1282 deletions

View File

@@ -19,6 +19,7 @@ package org.springframework.beans.factory.parsing;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -33,9 +34,9 @@ public class CollectingReaderEventListener implements ReaderEventListener {
private final List defaults = new LinkedList();
private final Map componentDefinitions = CollectionFactory.createLinkedMapIfPossible(8);
private final Map componentDefinitions = new LinkedHashMap<>(8);
private final Map aliasMap = CollectionFactory.createLinkedMapIfPossible(8);
private final Map aliasMap = new LinkedHashMap<>(8);
private final List imports = new LinkedList();
@@ -87,4 +88,4 @@ public class CollectingReaderEventListener implements ReaderEventListener {
return Collections.unmodifiableList(this.imports);
}
}
}

View File

@@ -21,10 +21,10 @@ import java.lang.reflect.Proxy;
import java.util.Map;
import junit.framework.TestCase;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.easymock.MockControl;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.support.StaticMethodMatcherPointcut;
import org.springframework.aop.target.HotSwappableTargetSource;
@@ -32,7 +32,8 @@ import org.springframework.beans.DerivedTestBean;
import org.springframework.beans.FatalBeanException;
import org.springframework.beans.ITestBean;
import org.springframework.beans.TestBean;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.transaction.CallCountingTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
@@ -48,11 +49,13 @@ import org.springframework.transaction.TransactionStatus;
*/
public class BeanFactoryTransactionTests extends TestCase {
private XmlBeanFactory factory;
private DefaultListableBeanFactory factory;
@Override
public void setUp() {
this.factory = new XmlBeanFactory(new ClassPathResource("transactionalBeanFactory.xml", getClass()));
this.factory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(this.factory).loadBeanDefinitions(
new ClassPathResource("transactionalBeanFactory.xml", getClass()));
}
public void testGetsAreNotTransactionalWithProxyFactory1() throws NoSuchMethodException {
@@ -167,7 +170,8 @@ public class BeanFactoryTransactionTests extends TestCase {
*/
public void testNoTransactionAttributeSource() {
try {
XmlBeanFactory bf = new XmlBeanFactory(new ClassPathResource("noTransactionAttributeSource.xml", getClass()));
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(new ClassPathResource("noTransactionAttributeSource.xml", getClass()));
ITestBean testBean = (ITestBean) bf.getBean("noTransactionAttributeSource");
fail("Should require TransactionAttributeSource to be set");
}