Skip to content

Commit f5f1c82

Browse files
committed
Some docs clean up for ZK & XML modules
1 parent 6f3fdc7 commit f5f1c82

File tree

9 files changed

+32
-12
lines changed

9 files changed

+32
-12
lines changed

spring-integration-xml/src/main/java/org/springframework/integration/xml/AggregatedXmlMessageValidationException.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
import java.util.List;
2121

2222
/**
23+
* The validation exception which aggregate all the XML validation errors.
24+
*
2325
* @author Oleg Zhurakousky
2426
* @author Artem Bilan
27+
*
2528
* @since 2.0
2629
*/
2730
@SuppressWarnings("serial")
@@ -31,7 +34,7 @@ public class AggregatedXmlMessageValidationException extends RuntimeException {
3134

3235

3336
public AggregatedXmlMessageValidationException(List<Throwable> exceptions) {
34-
this.exceptions = (exceptions != null) ? exceptions : Collections.<Throwable>emptyList();
37+
this.exceptions = (exceptions != null) ? exceptions : Collections.emptyList();
3538
}
3639

3740
@Override

spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/XmlValidatingMessageSelector.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
import org.springframework.xml.validation.XmlValidatorFactory;
3838

3939
/**
40+
* The XML validation-specific {@link MessageSelector}.
41+
*
4042
* @author Oleg Zhurakousky
4143
* @author Gary Russell
4244
* @author Liujiong
@@ -74,7 +76,7 @@ public String getUrl() {
7476

7577

7678
/**
77-
* Creates a selector with a default {@link XmlValidator}. The validator will be initialized with
79+
* Create a selector with a default {@link XmlValidator}. The validator will be initialized with
7880
* the provided 'schema' location {@link Resource} and 'schemaType'. The valid options for schema
7981
* type are {@link XmlValidatorFactory#SCHEMA_W3C_XML} or {@link XmlValidatorFactory#SCHEMA_RELAX_NG}.
8082
* If no 'schemaType' is provided it will default to {@link XmlValidatorFactory#SCHEMA_W3C_XML};
@@ -133,8 +135,10 @@ public boolean accept(Message<?> message) {
133135
new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)));
134136
}
135137
else {
136-
LOGGER.info(new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)),
137-
exceptionMessage);
138+
if (LOGGER.isInfoEnabled()) {
139+
LOGGER.info(new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)),
140+
exceptionMessage);
141+
}
138142
}
139143
}
140144
return validationSuccess;

spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/AbstractXmlTransformer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.springframework.util.StringUtils;
2626

2727
/**
28-
* super class for XmlTransformer
28+
* Super class for XML transformers.
2929
*
3030
* @author Jonas Partner
3131
* @author Mark Fisher
@@ -73,7 +73,8 @@ public ResultFactory getResultFactory() {
7373
@Override
7474
protected void onInit() {
7575
super.onInit();
76-
ResultFactory generatedResultFactory = configureResultFactory(this.resultType, this.resultFactoryName, this.getBeanFactory());
76+
ResultFactory generatedResultFactory =
77+
configureResultFactory(this.resultType, this.resultFactoryName, getBeanFactory());
7778
if (generatedResultFactory != null) {
7879
this.resultFactory = generatedResultFactory;
7980
}

spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/MarshallingTransformer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* @author Mark Fisher
3535
* @author Jonas Partner
3636
* @author Gary Russell
37+
* @author Artem Bilan
3738
*/
3839
public class MarshallingTransformer extends AbstractXmlTransformer {
3940

@@ -44,13 +45,13 @@ public class MarshallingTransformer extends AbstractXmlTransformer {
4445
private volatile boolean extractPayload = true;
4546

4647

47-
public MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) throws ParserConfigurationException {
48+
public MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) {
4849
Assert.notNull(marshaller, "a marshaller is required");
4950
this.marshaller = marshaller;
5051
this.resultTransformer = resultTransformer;
5152
}
5253

53-
public MarshallingTransformer(Marshaller marshaller) throws ParserConfigurationException {
54+
public MarshallingTransformer(Marshaller marshaller) {
5455
this(marshaller, null);
5556
}
5657

@@ -59,7 +60,6 @@ public MarshallingTransformer(Marshaller marshaller) throws ParserConfigurationE
5960
* Specify whether the source Message's payload should be extracted prior
6061
* to marshalling. This value is set to "true" by default. To send the
6162
* Message itself as input to the Marshaller instead, set this to "false".
62-
*
6363
* @param extractPayload true if the payload should be extracted.
6464
*/
6565
public void setExtractPayload(boolean extractPayload) {
@@ -75,8 +75,8 @@ public String getComponentType() {
7575
@Override
7676
public Object doTransform(Message<?> message) {
7777
Object source = (this.extractPayload) ? message.getPayload() : message;
78-
Object transformedPayload = null;
79-
Result result = this.getResultFactory().createResult(source);
78+
Object transformedPayload;
79+
Result result = getResultFactory().createResult(source);
8080
if (result == null) {
8181
throw new MessagingException(
8282
"Unable to marshal payload, ResultFactory returned null.");

spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/support/XPathExpressionEvaluatingHeaderValueMessageProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import org.springframework.xml.xpath.XPathExpressionFactory;
3636

3737
/**
38+
* The xPath-specific {@link HeaderValueMessageProcessor}
39+
*
3840
* @author Jonas Partner
3941
* @author Mark Fisher
4042
* @author Artem Bilan

spring-integration-xml/src/main/java/org/springframework/integration/xml/xpath/XPathEvaluationType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
/**
2424
* Enumeration of different types of XPath evaluation used to indicate the type
2525
* of evaluation that should be carried out using a provided XPath expression.
26+
*
27+
* @author Mark Fisher
28+
* @author Jonas Partner
2629
*/
2730
public enum XPathEvaluationType {
2831

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Provides classes related to configuration.
3+
*/
4+
package org.springframework.integration.zookeeper.config;

spring-integration-zookeeper/src/main/java/org/springframework/integration/zookeeper/lock/ZookeeperLockRegistry.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ public ZookeeperLockRegistry(CuratorFramework client, KeyToPathStrategy keyToPat
122122
* used internally, an external executor may be required in some environments, for
123123
* example those that require the use of a {@code WorkManagerTaskExecutor}.
124124
* @param mutexTaskExecutor the executor.
125-
*
126125
* @since 4.2.10
127126
*/
128127
public void setMutexTaskExecutor(AsyncTaskExecutor mutexTaskExecutor) {

spring-integration-zookeeper/src/main/java/org/springframework/integration/zookeeper/metadata/ZookeeperMetadataStoreException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
package org.springframework.integration.zookeeper.metadata;
1818

1919
/**
20+
* A {@code ZookeeperMetadataStore}-specific exception.
21+
*
2022
* @author Marius Bogoevici
23+
* @author Artem Bilan
24+
*
2125
* @since 4.2
2226
*/
2327
@SuppressWarnings("serial")

0 commit comments

Comments
 (0)