Fix new Sonar smells

This commit is contained in:
Artem Bilan
2020-02-24 11:57:02 -05:00
parent 50ac603d6c
commit 7dbdbdee3f
7 changed files with 86 additions and 95 deletions

View File

@@ -31,11 +31,13 @@ import org.springframework.ws.transport.WebServiceMessageSender;
* The spec for a {@link MarshallingWebServiceOutboundGateway}.
*
* @author Gary Russell
* @author Artem Bilan
*
* @since 5.3
*
*/
public class MarshallingWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
MarshallingWsOutboundGatewaySpec, MarshallingWebServiceOutboundGateway> {
public class MarshallingWsOutboundGatewaySpec extends
BaseWsOutboundGatewaySpec<MarshallingWsOutboundGatewaySpec, MarshallingWebServiceOutboundGateway> {
protected MarshallingWsOutboundGatewaySpec(WebServiceTemplate template) {
this.template = template;
@@ -56,12 +58,13 @@ public class MarshallingWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
* {@link WebServiceTemplate} is not provided.
*
*/
public static class MarshallingWsOutboundGatewayNoTemplateSpec extends BaseWsOutboundGatewaySpec<
MarshallingWsOutboundGatewayNoTemplateSpec, MarshallingWebServiceOutboundGateway> {
public static class MarshallingWsOutboundGatewayNoTemplateSpec
extends BaseWsOutboundGatewaySpec<MarshallingWsOutboundGatewayNoTemplateSpec,
MarshallingWebServiceOutboundGateway> {
protected Marshaller gatewayMarshaller;
protected Marshaller gatewayMarshaller; // NOSONAR
protected Unmarshaller gatewayUnmarshaller;
protected Unmarshaller gatewayUnmarshaller; // NOSONAR
/**
* Configure the marshaller to use.

View File

@@ -18,9 +18,7 @@ package org.springframework.integration.ws.dsl;
import java.util.Arrays;
import org.springframework.integration.ws.MarshallingWebServiceOutboundGateway;
import org.springframework.integration.ws.SimpleWebServiceOutboundGateway;
import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.WebServiceMessageFactory;
import org.springframework.ws.client.core.FaultMessageResolver;
import org.springframework.ws.client.core.SourceExtractor;
@@ -32,11 +30,13 @@ import org.springframework.ws.transport.WebServiceMessageSender;
* The spec for a {@link SimpleWebServiceOutboundGateway}.
*
* @author Gary Russell
* @author Artem Bilan
*
* @since 5.3
*
*/
public class SimpleWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
SimpleWsOutboundGatewaySpec, SimpleWebServiceOutboundGateway> {
public class SimpleWsOutboundGatewaySpec
extends BaseWsOutboundGatewaySpec<SimpleWsOutboundGatewaySpec, SimpleWebServiceOutboundGateway> {
protected SourceExtractor<?> sourceExtractor; // NOSONAR
@@ -55,11 +55,11 @@ public class SimpleWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
}
/**
* Specify a flag to return the whole {@link WebServiceMessage} or build the
* {@code payload} based on {@link WebServiceMessage}
* Specify a flag to return the whole {@link org.springframework.ws.WebServiceMessage} or build the
* {@code payload} based on {@link org.springframework.ws.WebServiceMessage}
* and populated headers according {@code headerMapper} configuration.
* Defaults to extract payload.
* @param extract build payload or return a whole {@link WebServiceMessage}
* @param extract build payload or return a whole {@link org.springframework.ws.WebServiceMessage}
* @return the spec.
*/
public SimpleWsOutboundGatewaySpec extractPayload(boolean extract) {
@@ -91,12 +91,12 @@ public class SimpleWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
}
/**
* Spec for a {@link MarshallingWebServiceOutboundGateway} where an external
* Spec for a {@link SimpleWebServiceOutboundGateway} where an external
* {@link WebServiceTemplate} is not provided.
*
*/
public static class SimpleWsOutboundGatewayNoTemplateSpec extends BaseWsOutboundGatewaySpec<
SimpleWsOutboundGatewayNoTemplateSpec, SimpleWebServiceOutboundGateway> {
public static class SimpleWsOutboundGatewayNoTemplateSpec
extends BaseWsOutboundGatewaySpec<SimpleWsOutboundGatewayNoTemplateSpec, SimpleWebServiceOutboundGateway> {
protected SourceExtractor<?> sourceExtractor; // NOSONAR
@@ -154,11 +154,11 @@ public class SimpleWsOutboundGatewaySpec extends BaseWsOutboundGatewaySpec<
}
/**
* Specify a flag to return the whole {@link WebServiceMessage} or build the
* {@code payload} based on {@link WebServiceMessage}
* Specify a flag to return the whole {@link org.springframework.ws.WebServiceMessage} or build the
* {@code payload} based on {@link org.springframework.ws.WebServiceMessage}
* and populated headers according {@code headerMapper} configuration.
* Defaults to extract payload.
* @param extract build payload or return a whole {@link WebServiceMessage}
* @param extract build payload or return a whole {@link org.springframework.ws.WebServiceMessage}
* @return the spec.
*/
public SimpleWsOutboundGatewayNoTemplateSpec extractPayload(boolean extract) {

View File

@@ -16,16 +16,15 @@
package org.springframework.integration.ws.dsl;
import org.springframework.integration.ws.dsl.MarshallingWsOutboundGatewaySpec.MarshallingWsOutboundGatewayNoTemplateSpec;
import org.springframework.integration.ws.dsl.SimpleWsOutboundGatewaySpec.SimpleWsOutboundGatewayNoTemplateSpec;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.Unmarshaller;
import org.springframework.ws.client.core.WebServiceTemplate;
/**
* Factory class for web service components.
*
* @author Gary Russell
* @author Artem Bilan
*
* @since 5.3
*
*/
@@ -41,7 +40,7 @@ public final class Ws {
/**
* Create an instance with the provided {@link Marshaller} (which must also implement
* {@link Unmarshaller}).
* {@link org.springframework.oxm.Unmarshaller}).
* @param marshaller the marshaller.
* @return the spec.
*/
@@ -63,8 +62,9 @@ public final class Ws {
* Create an instance with a default {@link WebServiceTemplate}.
* @return the spec.
*/
public static MarshallingWsOutboundGatewayNoTemplateSpec marshallingOutboundGateway() {
return new MarshallingWsOutboundGatewayNoTemplateSpec();
public static MarshallingWsOutboundGatewaySpec.MarshallingWsOutboundGatewayNoTemplateSpec
marshallingOutboundGateway() {
return new MarshallingWsOutboundGatewaySpec.MarshallingWsOutboundGatewayNoTemplateSpec();
}
/**
@@ -80,8 +80,8 @@ public final class Ws {
* Create an instance.
* @return the spec.
*/
public static SimpleWsOutboundGatewayNoTemplateSpec simpleOutboundGateway() {
return new SimpleWsOutboundGatewayNoTemplateSpec();
public static SimpleWsOutboundGatewaySpec.SimpleWsOutboundGatewayNoTemplateSpec simpleOutboundGateway() {
return new SimpleWsOutboundGatewaySpec.SimpleWsOutboundGatewayNoTemplateSpec();
}
/**