Skip to content

Commit 2e55903

Browse files
committed
Polishing
1 parent a2973c7 commit 2e55903

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2005-2010 the original author or authors.
2+
* Copyright 2005-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -232,7 +232,7 @@ private String getHeaderValue(TransportInputStream transportInputStream, String
232232

233233
private boolean isMultiPartRelated(String contentType) {
234234
contentType = contentType.toLowerCase(Locale.ENGLISH);
235-
return contentType.indexOf(MULTI_PART_RELATED_CONTENT_TYPE) != -1;
235+
return contentType.contains(MULTI_PART_RELATED_CONTENT_TYPE);
236236
}
237237

238238
/** Creates an AxiomSoapMessage without attachments. */
@@ -272,10 +272,10 @@ else if (MTOMConstants.MTOM_TYPE.equals(attachments.getAttachmentSpecType())) {
272272
}
273273

274274
private String getSoapEnvelopeNamespace(String contentType) {
275-
if (contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) != -1) {
275+
if (contentType.contains(SOAP11Constants.SOAP_11_CONTENT_TYPE)) {
276276
return SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
277277
}
278-
else if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) != -1) {
278+
else if (contentType.contains(SOAP12Constants.SOAP_12_CONTENT_TYPE)) {
279279
return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
280280
}
281281
else {

core/src/test/java/org/springframework/ws/server/MessageDispatcherTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2005-2011 the original author or authors.
2+
* Copyright 2005-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ public void testGetEndpointAdapterSupportedEndpoint() throws Exception {
8181

8282
verify(adapterMock, factoryMock);
8383

84-
Assert.assertEquals("getEnpointAdapter returns invalid EndpointAdapter", adapterMock, result);
84+
Assert.assertEquals("getEndpointAdapter returns invalid EndpointAdapter", adapterMock, result);
8585
}
8686

8787
@Test

core/src/test/java/org/springframework/ws/soap/soap11/AbstractSoap11MessageFactoryTestCase.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public void testCreateSoapMessageIllFormedXml() throws Exception {
6767
headers.put("Content-Type", "text/xml");
6868
TransportInputStream tis = new MockTransportInputStream(is, headers);
6969

70-
WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
71-
message.writeTo(System.out);
70+
messageFactory.createWebServiceMessage(tis);
7271
}
7372

7473
@Override

0 commit comments

Comments
 (0)