Skip to content

Commit b9bf195

Browse files
committed
Adapt XPathRouter to the latest Spring WS
* Fix typos in `XPathRouter` Javadocs * Make config snippets as Javadocs `{@code}`
1 parent 2324cf2 commit b9bf195

File tree

1 file changed

+4
-3
lines changed
  • spring-integration-xml/src/main/java/org/springframework/integration/xml/router

1 file changed

+4
-3
lines changed

spring-integration-xml/src/main/java/org/springframework/integration/xml/router/XPathRouter.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
*
4040
* @author Jonas Partner
4141
* @author Oleg Zhurakousky
42+
* @author Artem Bilan
4243
*/
4344
public class XPathRouter extends AbstractMappingMessageRouter {
4445

@@ -63,7 +64,7 @@ public XPathRouter(String expression, Map<String, String> namespaces) {
6364

6465
/**
6566
* Create a router uses an XPath expression with one namespace. For example,
66-
* expression='/ns1:one/@type' prefix='ns1' namespace='www.example.org'
67+
* {@code expression='/ns1:one/@type' prefix='ns1' namespace='www.example.org'}
6768
* @param expression the XPath expression as a String
6869
* @param prefix namespace prefix
6970
* @param namespace namespace uri
@@ -77,7 +78,7 @@ public XPathRouter(String expression, String prefix, String namespace) {
7778

7879
/**
7980
* Create a router that uses an XPath expression with no namespaces.
80-
* For example '/one/@type'
81+
* For example, {@code '/one/@type'}
8182
* @param expression the XPath expression as a String
8283
*/
8384
public XPathRouter(String expression) {
@@ -119,7 +120,7 @@ public String getComponentType() {
119120
return Collections.<@Nullable Object>singletonList(this.xPathExpression.evaluateAsString(node));
120121
}
121122
else {
122-
return (List<@Nullable Object>) this.xPathExpression.evaluate(node, this.nodeMapper);
123+
return this.xPathExpression.evaluate(node, this.nodeMapper);
123124
}
124125
}
125126

0 commit comments

Comments
 (0)