diff --git a/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java b/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java new file mode 100644 index 00000000000..493a856fc22 --- /dev/null +++ b/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java @@ -0,0 +1,36 @@ +package org.springframework.beans; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Map; + +import org.junit.Test; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.beans.factory.xml.XmlBeanFactory; +import org.springframework.core.io.ClassPathResource; + +public class Spr6972Tests { + @Test + public void repro() { + BeanFactory bf = new XmlBeanFactory(new ClassPathResource("Spr6972Tests-context.xml", this.getClass())); + TestSpringBean bean = bf.getBean(TestSpringBean.class); + assertTrue(bean.bool); + assertNotNull(bean.map); + } +} + +class TestSpringBean { + boolean bool; + Map map; + + public TestSpringBean(boolean bool, Map map) { + this.bool = bool; + this.map = map; + } + + public TestSpringBean(Map map) { + this(true, map); + } +} diff --git a/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml new file mode 100644 index 00000000000..6fef4988147 --- /dev/null +++ b/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml @@ -0,0 +1,16 @@ + + + + + + + entry1string1 + entry2string2 + entry3string3 + entry4string4 + + + +