diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java index bb67d88329..6a664b203c 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/PointToPointChannelParser.java @@ -27,6 +27,7 @@ import org.springframework.util.xml.DomUtils; * Parser for the <channel> element. * * @author Mark Fisher + * @author Iwein Fuld */ public class PointToPointChannelParser extends AbstractChannelParser { @@ -61,7 +62,7 @@ public class PointToPointChannelParser extends AbstractChannelParser { private void parseQueueCapacity(BeanDefinitionBuilder builder, Element queueElement) { String capacity = queueElement.getAttribute("capacity"); if (StringUtils.hasText(capacity)) { - builder.addConstructorArgValue(Integer.valueOf(capacity)); + builder.addConstructorArgValue(capacity); } } diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests-context.xml b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests-context.xml new file mode 100644 index 0000000000..1d565c430c --- /dev/null +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests-context.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java new file mode 100644 index 0000000000..28397624ad --- /dev/null +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java @@ -0,0 +1,43 @@ +/* + * Copyright 2002-2008 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.integration.config.xml.propertyplaceholder; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * + * @author Iwein Fuld + * + */ +@ContextConfiguration +@RunWith(SpringJUnit4ClassRunner.class) +public class PropertyPlaceholderTests { + + @Test + public void context() throws Exception { + //parsing and instantiating is enough + } + + public static class SanityCheck{ + public SanityCheck(Integer i) { + //this will throw an exception if the placeholder isn't replaced + } + } +} diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/channel.properties b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/channel.properties new file mode 100644 index 0000000000..e92655969d --- /dev/null +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/channel.properties @@ -0,0 +1 @@ +capacity=10