Merge branch '4.1.x'

This commit is contained in:
Stéphane Nicoll
2025-05-06 09:06:45 +02:00
27 changed files with 52 additions and 52 deletions

View File

@@ -58,9 +58,9 @@ public class Wsdl11DestinationProvider extends AbstractCachingDestinationProvide
*/
public static final String DEFAULT_WSDL_LOCATION_EXPRESSION = "/wsdl:definitions/wsdl:service/wsdl:port/soap:address/@location";
private static TransformerFactory transformerFactory = TransformerFactoryUtils.newInstance();
private static final TransformerFactory transformerFactory = TransformerFactoryUtils.newInstance();
private Map<String, String> expressionNamespaces = new HashMap<>();
private final Map<String, String> expressionNamespaces = new HashMap<>();
private XPathExpression locationXPathExpression;

View File

@@ -34,7 +34,7 @@ import org.springframework.ws.server.endpoint.adapter.method.MethodReturnValueHa
@Deprecated(since = "4.0.12", forRemoval = true)
public class WsConfigurerComposite implements WsConfigurer {
private List<WsConfigurer> delegates = new ArrayList<>();
private final List<WsConfigurer> delegates = new ArrayList<>();
public void addWsConfigurers(List<WsConfigurer> configurers) {
if (configurers != null) {

View File

@@ -45,7 +45,7 @@ public class DomPoxMessageFactory extends TransformerObjectSupport implements We
/** The default content type for the POX messages. */
public static final String DEFAULT_CONTENT_TYPE = "application/xml";
private DocumentBuilderFactory documentBuilderFactory;
private final DocumentBuilderFactory documentBuilderFactory;
private String contentType = DEFAULT_CONTENT_TYPE;

View File

@@ -26,7 +26,7 @@ package org.springframework.ws.server;
*/
public class EndpointInvocationChain {
private Object endpoint;
private final Object endpoint;
private EndpointInterceptor[] interceptors;

View File

@@ -47,7 +47,7 @@ import org.springframework.xml.XMLInputFactoryUtils;
*/
public class SourcePayloadMethodProcessor extends AbstractPayloadSourceMethodProcessor {
private XMLInputFactory inputFactory = createXmlInputFactory();
private final XMLInputFactory inputFactory = createXmlInputFactory();
// MethodArgumentResolver

View File

@@ -49,7 +49,7 @@ import org.springframework.xml.DocumentBuilderFactoryUtils;
*/
public class XomPayloadMethodProcessor extends AbstractPayloadSourceMethodProcessor {
private DocumentBuilderFactory documentBuilderFactory = createDocumentBuilderFactory();
private final DocumentBuilderFactory documentBuilderFactory = createDocumentBuilderFactory();
@Override
protected boolean supportsRequestPayloadParameter(MethodParameter parameter) {

View File

@@ -42,25 +42,25 @@ public interface SoapVersion {
private static final String CONTENT_TYPE = "text/xml";
private QName ENVELOPE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Envelope");
private final QName ENVELOPE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Envelope");
private QName HEADER_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Header");
private final QName HEADER_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Header");
private QName BODY_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Body");
private final QName BODY_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Body");
private QName FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Fault");
private final QName FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Fault");
private QName MUST_UNDERSTAND_ATTRIBUTE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "mustUnderstand");
private final QName MUST_UNDERSTAND_ATTRIBUTE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "mustUnderstand");
private QName ACTOR_NAME = new QName(ENVELOPE_NAMESPACE_URI, "actor");
private final QName ACTOR_NAME = new QName(ENVELOPE_NAMESPACE_URI, "actor");
private QName CLIENT_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Client");
private final QName CLIENT_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Client");
private QName SERVER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Server");
private final QName SERVER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Server");
private QName MUST_UNDERSTAND_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "MustUnderstand");
private final QName MUST_UNDERSTAND_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "MustUnderstand");
private QName VERSION_MISMATCH_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "VersionMismatch");
private final QName VERSION_MISMATCH_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "VersionMismatch");
public QName getBodyName() {
return this.BODY_NAME;
@@ -143,25 +143,25 @@ public interface SoapVersion {
private static final String CONTENT_TYPE = "application/soap+xml";
private QName ENVELOPE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Envelope");
private final QName ENVELOPE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Envelope");
private QName HEADER_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Header");
private final QName HEADER_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Header");
private QName BODY_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Body");
private final QName BODY_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Body");
private QName FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Fault");
private final QName FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Fault");
private QName MUST_UNDERSTAND_ATTRIBUTE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "mustUnderstand");
private final QName MUST_UNDERSTAND_ATTRIBUTE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "mustUnderstand");
private QName ROLE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "role");
private final QName ROLE_NAME = new QName(ENVELOPE_NAMESPACE_URI, "role");
private QName SENDER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Sender");
private final QName SENDER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Sender");
private QName RECEIVER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Receiver");
private final QName RECEIVER_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "Receiver");
private QName MUST_UNDERSTAND_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "MustUnderstand");
private final QName MUST_UNDERSTAND_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "MustUnderstand");
private QName VERSION_MISMATCH_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "VersionMismatch");
private final QName VERSION_MISMATCH_FAULT_NAME = new QName(ENVELOPE_NAMESPACE_URI, "VersionMismatch");
public QName getBodyName() {
return this.BODY_NAME;

View File

@@ -51,9 +51,9 @@ class AddressingEndpointInterceptor implements SoapEndpointInterceptor {
private final WebServiceMessageSender[] messageSenders;
private URI replyAction;
private final URI replyAction;
private URI faultAction;
private final URI faultAction;
AddressingEndpointInterceptor(AddressingVersion version, MessageIdStrategy messageIdStrategy,
WebServiceMessageSender[] messageSenders, URI replyAction, URI faultAction) {

View File

@@ -64,7 +64,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
*/
public abstract class AbstractAddressingVersion extends TransformerObjectSupport implements AddressingVersion {
private static DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactoryUtils.newInstance();
private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactoryUtils.newInstance();
private final XPathExpression toExpression;

View File

@@ -46,7 +46,7 @@ public class SaajContentHandler implements ContentHandler {
private final SOAPEnvelope envelope;
private Map<String, String> namespaces = new LinkedHashMap<>();
private final Map<String, String> namespaces = new LinkedHashMap<>();
/**
* Constructs a new instance of the {@code SaajContentHandler} that creates children

View File

@@ -62,7 +62,7 @@ public abstract class SaajUtils {
*/
public static final int SAAJ_13 = 2;
private static int saajVersion = SAAJ_13;
private static final int saajVersion = SAAJ_13;
/**
* Gets the SAAJ version. Returns {@link #SAAJ_13} as of Spring-WS 2.2.

View File

@@ -32,7 +32,7 @@ import org.springframework.util.CollectionUtils;
*/
public class SoapFaultMappingExceptionResolver extends AbstractSoapFaultDefinitionExceptionResolver {
private Map<String, String> exceptionMappings = new LinkedHashMap<>();
private final Map<String, String> exceptionMappings = new LinkedHashMap<>();
/**
* Set the mappings between exception class names and SOAP Faults. The exception class

View File

@@ -89,7 +89,7 @@ public class WsdlDefinitionHandlerAdapter extends LocationTransformerObjectSuppo
private static final String CONTENT_TYPE = "text/xml";
private Map<String, String> expressionNamespaces = new HashMap<>();
private final Map<String, String> expressionNamespaces = new HashMap<>();
private String locationExpression = DEFAULT_LOCATION_EXPRESSION;

View File

@@ -61,7 +61,7 @@ public class XsdSchemaHandlerAdapter extends LocationTransformerObjectSupport
private static final String CONTENT_TYPE = "text/xml";
private Map<String, String> expressionNamespaces = new HashMap<>();
private final Map<String, String> expressionNamespaces = new HashMap<>();
private String schemaLocationExpression = DEFAULT_SCHEMA_LOCATION_EXPRESSION;

View File

@@ -43,7 +43,7 @@ import org.springframework.ws.context.MessageContext;
class Wss4jHandler extends WSHandler {
/** Keys are constants from {@link ConfigurationConstants}; values are strings. */
private Properties options = new Properties();
private final Properties options = new Properties();
private String securementPassword;

View File

@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
*/
public class CryptoFactoryBean implements FactoryBean<Crypto>, InitializingBean {
private Properties configuration = new Properties();
private final Properties configuration = new Properties();
private Crypto crypto;

View File

@@ -41,7 +41,7 @@ public class X509AuthenticationToken extends AbstractAuthenticationToken {
private Object principal;
private X509Certificate credentials;
private final X509Certificate credentials;
// ~ Constructors
// ===================================================================================================

View File

@@ -231,9 +231,9 @@ public class MailReceiverConnection extends AbstractReceiverConnection {
private static final class ByteArrayDataSource implements DataSource {
private byte[] data;
private final String contentType;
private String contentType;
private final byte[] data;
ByteArrayDataSource(String contentType, byte[] data) {
this.data = data;

View File

@@ -309,9 +309,9 @@ public class MailSenderConnection extends AbstractSenderConnection {
private static final class ByteArrayDataSource implements DataSource {
private byte[] data;
private final String contentType;
private String contentType;
private final byte[] data;
ByteArrayDataSource(String contentType, byte[] data) {
this.data = data;

View File

@@ -55,7 +55,7 @@ public class XmppMessageReceiver extends AbstractStandaloneMessageReceiver {
private WebServicePacketListener packetListener;
private String messageEncoding = DEFAULT_MESSAGE_ENCODING;
private final String messageEncoding = DEFAULT_MESSAGE_ENCODING;
public XmppMessageReceiver() {
}

View File

@@ -37,7 +37,7 @@ public class PayloadMessageCreator extends AbstractMessageCreator {
private final Source payload;
private TransformerHelper transformerHelper = new TransformerHelper();
private final TransformerHelper transformerHelper = new TransformerHelper();
/**
* Creates a new instance of the {@code PayloadMessageCreator} with the given payload

View File

@@ -43,7 +43,7 @@ public abstract class TransformerObjectSupport {
*/
protected final Log logger = LogFactory.getLog(getClass());
private TransformerHelper transformerHelper = new TransformerHelper();
private final TransformerHelper transformerHelper = new TransformerHelper();
/**
* Specify the {@code TransformerFactory} class to use.

View File

@@ -50,7 +50,7 @@ abstract class Jaxp13ValidatorFactory {
private static final class Jaxp13Validator implements XmlValidator {
private Schema schema;
private final Schema schema;
Jaxp13Validator(Schema schema) {
this.schema = schema;
@@ -84,7 +84,7 @@ abstract class Jaxp13ValidatorFactory {
*/
private static final class DefaultValidationErrorHandler implements ValidationErrorHandler {
private List<SAXParseException> errors = new ArrayList<>();
private final List<SAXParseException> errors = new ArrayList<>();
@Override
public SAXParseException[] getErrors() {

View File

@@ -58,7 +58,7 @@ abstract class Jaxp15ValidatorFactory {
private static final class Jaxp15Validator implements XmlValidator {
private Schema schema;
private final Schema schema;
Jaxp15Validator(Schema schema) {
this.schema = schema;
@@ -113,7 +113,7 @@ abstract class Jaxp15ValidatorFactory {
*/
private static final class DefaultValidationErrorHandler implements ValidationErrorHandler {
private List<SAXParseException> errors = new ArrayList<>();
private final List<SAXParseException> errors = new ArrayList<>();
@Override
public SAXParseException[] getErrors() {

View File

@@ -77,7 +77,7 @@ abstract class JaxenXPathExpressionFactory {
/** Jaxen implementation of the {@code XPathExpression} interface. */
private static final class JaxenXpathExpression implements XPathExpression {
private XPath xpath;
private final XPath xpath;
private final String expression;

View File

@@ -42,7 +42,7 @@ import org.springframework.xml.namespace.SimpleNamespaceContext;
*/
abstract class Jaxp13XPathExpressionFactory {
private static XPathFactory xpathFactory = XPathFactory.newInstance();
private static final XPathFactory xpathFactory = XPathFactory.newInstance();
/**
* Creates a JAXP 1.3 {@code XPathExpression} from the given string expression.

View File

@@ -50,7 +50,7 @@ import org.springframework.xml.validation.XmlValidatorFactory;
*/
public class SimpleXsdSchema implements XsdSchema, InitializingBean {
private static DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactoryUtils.newInstance();
private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactoryUtils.newInstance();
private static final String SCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";