Browse Source

Merge branch 'SPR-9431' into cleanup-3.2.x

* SPR-9431:
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
pull/213/head
Chris Beams 13 years ago
parent
commit
3a61e9999f
  1. 4
      spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java
  2. 4
      spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java
  3. 5
      spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj
  4. 8
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java
  5. 26
      spring-beans/src/test/java/com/foo/Component.java
  6. 11
      spring-beans/src/test/java/com/foo/ComponentNamespaceHandler.java
  7. 2
      spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
  8. 2
      spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
  9. 3
      spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java
  10. 1
      spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java
  11. 18
      spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java
  12. 3
      spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java
  13. 1
      spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java
  14. 4
      spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java
  15. 3
      spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java
  16. 17
      spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java
  17. 24
      spring-jdbc/src/test/java/org/springframework/jdbc/support/custom-error-codes.xml
  18. 14
      spring-jdbc/src/test/java/org/springframework/jdbc/support/test-error-codes.xml
  19. 38
      spring-jdbc/src/test/java/org/springframework/jdbc/support/wildcard-error-codes.xml
  20. 30
      spring-orm/src/test/java/org/springframework/orm/hibernate3/filterDefinitions.xml
  21. 32
      spring-orm/src/test/java/org/springframework/orm/hibernate3/typeDefinitions.xml
  22. 1
      spring-orm/src/test/java/org/springframework/orm/jdo/test.properties
  23. 4
      spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java
  24. 12
      spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/empty-servlet.xml
  25. 16
      spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/sessionContext.xml
  26. 1
      spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java
  27. 3
      spring-webmvc/src/test/java/org/springframework/web/servlet/complexviews.properties
  28. 42
      src/test/java/com/foo/Component.java
  29. 16
      src/test/java/com/foo/ComponentBeanDefinitionParser.java
  30. 3
      src/test/java/com/foo/ComponentBeanDefinitionParserTests.java
  31. 16
      src/test/java/com/foo/ComponentFactoryBean.java
  32. 27
      src/test/java/com/foo/ComponentNamespaceHandler.java
  33. 0
      src/test/resources/META-INF/spring.handlers
  34. 0
      src/test/resources/META-INF/spring.schemas
  35. 0
      src/test/resources/com/foo/component-config.xml
  36. 0
      src/test/resources/com/foo/component.xsd

4
spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock; @@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.lang.reflect.Method;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;

4
spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock; @@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.lang.reflect.Method;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;

5
spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -16,6 +16,8 @@ @@ -16,6 +16,8 @@
package org.springframework.aop.aspectj.autoproxy;
import org.aspectj.lang.annotation.SuppressAjWarnings;
/**
* @author Adrian Colyer
*/
@ -25,6 +27,7 @@ public aspect CodeStyleAspect { @@ -25,6 +27,7 @@ public aspect CodeStyleAspect {
pointcut somePC() : call(* someMethod());
@SuppressAjWarnings("adviceDidNotMatch")
before() : somePC() {
System.out.println("match");
}

8
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java

@ -49,14 +49,14 @@ public class AnnotationAsyncExecutionAspectTests { @@ -49,14 +49,14 @@ public class AnnotationAsyncExecutionAspectTests {
@Before
public void setUp() {
Assume.group(TestGroup.PERFORMANCE);
executor = new CountingExecutor();
AnnotationAsyncExecutionAspect.aspectOf().setExecutor(executor);
}
@Test
public void asyncMethodGetsRoutedAsynchronously() {
Assume.group(TestGroup.PERFORMANCE);
ClassWithoutAsyncAnnotation obj = new ClassWithoutAsyncAnnotation();
obj.incrementAsync();
executor.waitForCompletion();
@ -107,6 +107,7 @@ public class AnnotationAsyncExecutionAspectTests { @@ -107,6 +107,7 @@ public class AnnotationAsyncExecutionAspectTests {
assertEquals(1, executor.submitCompleteCounter);
}
/*
@Test
public void methodReturningNonVoidNonFutureInAsyncClassGetsRoutedSynchronously() {
ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation();
@ -115,6 +116,7 @@ public class AnnotationAsyncExecutionAspectTests { @@ -115,6 +116,7 @@ public class AnnotationAsyncExecutionAspectTests {
assertEquals(0, executor.submitStartCounter);
assertEquals(0, executor.submitCompleteCounter);
}
*/
@Test
public void qualifiedAsyncMethodsAreRoutedToCorrectExecutor() throws InterruptedException, ExecutionException {
@ -198,9 +200,11 @@ public class AnnotationAsyncExecutionAspectTests { @@ -198,9 +200,11 @@ public class AnnotationAsyncExecutionAspectTests {
// Manually check that there is a warning from the 'declare warning' statement in
// AnnotationAsyncExecutionAspect
/*
public int return5() {
return 5;
}
*/
public Future<Integer> incrementReturningAFuture() {
counter++;

26
spring-beans/src/test/java/com/foo/Component.java

@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
package com.foo;
import java.util.ArrayList;
import java.util.List;
public class Component {
private String name;
private List<Component> components = new ArrayList<Component>();
// mmm, there is no setter method for the 'components'
public void addComponent(Component component) {
this.components.add(component);
}
public List<Component> getComponents() {
return components;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

11
spring-beans/src/test/java/com/foo/ComponentNamespaceHandler.java

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
package com.foo;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
public class ComponentNamespaceHandler extends NamespaceHandlerSupport {
@Override
public void init() {
registerBeanDefinitionParser("component",
new ComponentBeanDefinitionParser());
}
}

2
spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java

@ -47,8 +47,6 @@ import org.springframework.core.io.UrlResource; @@ -47,8 +47,6 @@ import org.springframework.core.io.UrlResource;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import org.springframework.tests.sample.beans.GenericBean;
import org.springframework.tests.sample.beans.GenericIntegerBean;
import org.springframework.tests.sample.beans.GenericSetOfIntegerBean;

2
spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java

@ -24,8 +24,6 @@ import org.junit.Test; @@ -24,8 +24,6 @@ import org.junit.Test;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;

3
spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -29,7 +29,6 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; @@ -29,7 +29,6 @@ import org.springframework.beans.factory.parsing.ComponentDefinition;
import org.springframework.beans.factory.parsing.DefaultsDefinition;
import org.springframework.beans.factory.parsing.ImportDefinition;
import org.springframework.beans.factory.parsing.ReaderEventListener;
import org.springframework.core.CollectionFactory;
/**
* @author Rob Harrop

1
spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.context.annotation;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeFalse;
import javax.annotation.Resource;

18
spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2013 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.context.annotation;
import static org.hamcrest.CoreMatchers.equalTo;
@ -31,7 +47,7 @@ public class BeanMethodPolymorphismTests { @@ -31,7 +47,7 @@ public class BeanMethodPolymorphismTests {
@Test
public void beanMethodOverloadingWithoutInheritance() {
@SuppressWarnings("unused")
@SuppressWarnings({ "unused", "hiding" })
@Configuration class Config {
@Bean String aString() { return "na"; }
@Bean String aString(Integer dependency) { return "na"; }

3
spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -18,7 +18,6 @@ package org.springframework.ejb.access; @@ -18,7 +18,6 @@ package org.springframework.ejb.access;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

1
spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java

@ -28,7 +28,6 @@ import org.springframework.tests.TestGroup; @@ -28,7 +28,6 @@ import org.springframework.tests.TestGroup;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.mockito.Mockito.*;
/**
* @author Rick Evans

4
spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -1048,7 +1048,7 @@ public class BridgeMethodResolverTests { @@ -1048,7 +1048,7 @@ public class BridgeMethodResolverTests {
}
public class GenericSqlMapIntegerDao<T extends Integer> extends GenericSqlMapDao<T> {
public class GenericSqlMapIntegerDao<T extends Number> extends GenericSqlMapDao<T> {
@Override
public void saveOrUpdate(T t) {

3
spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -26,7 +26,6 @@ import java.math.BigDecimal; @@ -26,7 +26,6 @@ import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;

17
spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2013 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.jdbc.core.simple;
import static org.junit.Assert.*;
@ -9,7 +25,6 @@ import static org.mockito.Mockito.verify; @@ -9,7 +25,6 @@ import static org.mockito.Mockito.verify;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Date;

24
spring-jdbc/src/test/java/org/springframework/jdbc/support/custom-error-codes.xml

@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!--
Whacky error codes for testing
-->
<bean id="Oracle" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes"><value>1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>1,1400,1722</value></property>
<property name="customTranslations">
<list>
<bean class="org.springframework.jdbc.support.CustomSQLErrorCodesTranslation">
<property name="errorCodes"><value>999</value></property>
<property name="exceptionClass">
<value>org.springframework.jdbc.support.CustomErrorCodeException</value>
</property>
</bean>
</list>
</property>
</bean>
</beans>

14
spring-jdbc/src/test/java/org/springframework/jdbc/support/test-error-codes.xml

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!--
Whacky error codes for testing
-->
<bean id="Oracle" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes"><value>1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>1,1400,1722</value></property>
</bean>
</beans>

38
spring-jdbc/src/test/java/org/springframework/jdbc/support/wildcard-error-codes.xml

@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!--
Whacky error codes for testing
-->
<bean id="Oracle" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes"><value>1,2,942</value></property>
<property name="dataIntegrityViolationCodes"><value>1,1400,1722</value></property>
</bean>
<bean id="DB0" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName"><value>*DB0</value></property>
<property name="badSqlGrammarCodes"><value>-204,1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>3,4</value></property>
</bean>
<bean id="DB1" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName"><value>DB1*</value></property>
<property name="badSqlGrammarCodes"><value>-204,1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>3,4</value></property>
</bean>
<bean id="DB2" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName"><value>*DB2*</value></property>
<property name="badSqlGrammarCodes"><value>-204,1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>3,4</value></property>
</bean>
<bean id="DB3" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName"><value>*DB3*</value></property>
<property name="badSqlGrammarCodes"><value>-204,1,2</value></property>
<property name="dataIntegrityViolationCodes"><value>3,4</value></property>
</bean>
</beans>

30
spring-orm/src/test/java/org/springframework/orm/hibernate3/filterDefinitions.xml

@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBeanTests$FilterTestLocalSessionFactoryBean">
<property name="filterDefinitions">
<list>
<bean class="org.springframework.orm.hibernate3.FilterDefinitionFactoryBean">
<property name="filterName" value="filter1"/>
<property name="parameterTypes">
<props>
<prop key="param1">string</prop>
<prop key="otherParam">long</prop>
</props>
</property>
<property name="defaultFilterCondition" value="someCondition"/>
</bean>
<bean id="filter2" class="org.springframework.orm.hibernate3.FilterDefinitionFactoryBean">
<property name="parameterTypes">
<props>
<prop key="myParam">integer</prop>
</props>
</property>
</bean>
</list>
</property>
</bean>
</beans>

32
spring-orm/src/test/java/org/springframework/orm/hibernate3/typeDefinitions.xml

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBeanTests$TypeTestLocalSessionFactoryBean">
<property name="typeDefinitions">
<list>
<bean class="org.springframework.orm.hibernate3.TypeDefinitionBean">
<property name="typeName" value="type1"/>
<property name="typeClass" value="mypackage.MyTypeClass"/>
<property name="parameters">
<props>
<prop key="param1">value1</prop>
<prop key="otherParam">othervalue</prop>
</props>
</property>
</bean>
<bean id="type2" class="org.springframework.orm.hibernate3.TypeDefinitionBean">
<property name="typeName" value="type2"/>
<property name="typeClass" value="mypackage.MyOtherTypeClass"/>
<property name="parameters">
<props>
<prop key="myParam">myvalue</prop>
</props>
</property>
</bean>
</list>
</property>
</bean>
</beans>

1
spring-orm/src/test/java/org/springframework/orm/jdo/test.properties

@ -1 +0,0 @@ @@ -1 +0,0 @@
myKey=myValue

4
spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
package org.springframework.web.portlet.bind;
import junit.framework.TestCase;
import org.junit.Test;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;

12
spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/empty-servlet.xml

@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
<bean id="servletContextAwareBean" class="org.springframework.web.context.ServletContextAwareBean"/>
<bean id="servletConfigAwareBean" class="org.springframework.web.context.ServletConfigAwareBean"/>
</beans>

16
spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/sessionContext.xml

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="rob" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="dummy"/>
<property name="age" value="-1"/>
</bean>
<bean id="rodProto" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="dummy"/>
<property name="age" value="-1"/>
</bean>
</beans>

1
spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java

@ -41,7 +41,6 @@ import org.springframework.beans.factory.support.ManagedList; @@ -41,7 +41,6 @@ import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.support.ManagedMap;
import org.springframework.beans.factory.support.ManagedSet;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.Resource;
import org.springframework.mock.web.test.MockServletContext;

3
spring-webmvc/src/test/java/org/springframework/web/servlet/complexviews.properties

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
form.(class)=org.springframework.web.servlet.view.InternalResourceView
form.requestContextAttribute=rc
form.url=myform.jsp

42
src/test/java/com/foo/Component.java

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
/*
* Copyright 2002-2013 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 com.foo;
import java.util.ArrayList;
import java.util.List;
public class Component {
private String name;
private List<Component> components = new ArrayList<Component>();
// mmm, there is no setter method for the 'components'
public void addComponent(Component component) {
this.components.add(component);
}
public List<Component> getComponents() {
return components;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

16
spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParser.java → src/test/java/com/foo/ComponentBeanDefinitionParser.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2013 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 com.foo;
import java.util.List;

3
spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java → src/test/java/com/foo/ComponentBeanDefinitionParserTests.java

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.foo;
import static org.hamcrest.CoreMatchers.equalTo;
@ -30,7 +31,7 @@ import org.springframework.core.io.ClassPathResource; @@ -30,7 +31,7 @@ import org.springframework.core.io.ClassPathResource;
/**
* @author Costin Leau
*/
public class ComponentBeanDefinitionParserTest {
public class ComponentBeanDefinitionParserTests {
private static DefaultListableBeanFactory bf;

16
spring-beans/src/test/java/com/foo/ComponentFactoryBean.java → src/test/java/com/foo/ComponentFactoryBean.java

@ -1,3 +1,19 @@ @@ -1,3 +1,19 @@
/*
* Copyright 2002-2013 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 com.foo;
import java.util.List;

27
src/test/java/com/foo/ComponentNamespaceHandler.java

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
/*
* Copyright 2002-2013 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 com.foo;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
public class ComponentNamespaceHandler extends NamespaceHandlerSupport {
@Override
public void init() {
registerBeanDefinitionParser("component",
new ComponentBeanDefinitionParser());
}
}

0
spring-beans/src/test/resources/META-INF/spring.handlers → src/test/resources/META-INF/spring.handlers

0
spring-beans/src/test/resources/META-INF/spring.schemas → src/test/resources/META-INF/spring.schemas

0
spring-beans/src/test/resources/com/foo/component-config.xml → src/test/resources/com/foo/component-config.xml

0
spring-beans/src/test/resources/com/foo/component.xsd → src/test/resources/com/foo/component.xsd

Loading…
Cancel
Save