Code Polishing (Sonar)

- remove redundant modifiers
- overridable methods called from ctors

Polishing - PR Comments
This commit is contained in:
Gary Russell
2015-12-03 15:23:12 -05:00
committed by Artem Bilan
parent ddb4321e1d
commit 255247ca9a
56 changed files with 447 additions and 381 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 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.
@@ -53,7 +53,7 @@ public class XmlValidatingMessageSelector implements MessageSelector {
private final String url;
private SchemaType(String url) {
SchemaType(String url) {
this.url = url;
}

View File

@@ -65,6 +65,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
* @author Jonas Partner
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell
*/
public class XPathMessageSplitter extends AbstractMessageSplitter {
@@ -118,6 +119,7 @@ public class XPathMessageSplitter extends AbstractMessageSplitter {
this.createDocuments = createDocuments;
}
@Override
public String getComponentType() {
return "xml:xpath-splitter";
}
@@ -275,7 +277,7 @@ public class XPathMessageSplitter extends AbstractMessageSplitter {
private int index;
public NodeListIterator(NodeList nodeList) throws ParserConfigurationException {
private NodeListIterator(NodeList nodeList) throws ParserConfigurationException {
this.nodeList = nodeList;
if (XPathMessageSplitter.this.createDocuments) {
this.documentBuilder = getNewDocumentBuilder();
@@ -292,8 +294,9 @@ public class XPathMessageSplitter extends AbstractMessageSplitter {
@Override
public Node next() {
if (!hasNext())
if (!hasNext()) {
return null;
}
Node node = nodeList.item(index++);
if (this.documentBuilder != null) {