Skip to content

Commit eeccbce

Browse files
committed
Harmonize code format
Closes gh-1496
1 parent 3463205 commit eeccbce

File tree

10 files changed

+26
-47
lines changed

10 files changed

+26
-47
lines changed

spring-ws-core/src/main/java/org/springframework/ws/transport/http/HttpComponents5ClientFactory.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ public CloseableHttpClient getObject() throws Exception {
218218

219219
applyMaxConnectionsPerHost(this.connectionManager);
220220

221-
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom() //
222-
.setConnectTimeout(Timeout.of(this.connectionTimeout)) //
221+
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom()
222+
.setConnectTimeout(Timeout.of(this.connectionTimeout))
223223
.setResponseTimeout(Timeout.of(this.readTimeout));
224224

225-
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create() //
226-
.setDefaultRequestConfig(requestConfigBuilder.build()) //
225+
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create()
226+
.setDefaultRequestConfig(requestConfigBuilder.build())
227227
.setConnectionManager(this.connectionManager);
228228

229229
if (this.credentials != null && this.authScope != null) {

spring-ws-core/src/main/java/org/springframework/ws/transport/http/HttpComponents5Connection.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,13 @@ protected InputStream getRawResponseInputStream() throws IOException {
181181
@Override
182182
public Iterator<String> getResponseHeaderNames() throws IOException {
183183

184-
return Arrays.stream(this.httpResponse.getHeaders()) //
185-
.map(NameValuePair::getName) //
186-
.iterator();
184+
return Arrays.stream(this.httpResponse.getHeaders()).map(NameValuePair::getName).iterator();
187185
}
188186

189187
@Override
190188
public Iterator<String> getResponseHeaders(String name) throws IOException {
191189

192-
return Arrays.stream(this.httpResponse.getHeaders(name)) //
193-
.map(NameValuePair::getValue) //
194-
.iterator();
190+
return Arrays.stream(this.httpResponse.getHeaders(name)).map(NameValuePair::getValue).iterator();
195191
}
196192

197193
}

spring-ws-core/src/main/java/org/springframework/ws/transport/http/JdkHttpClientConnection.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ protected long getResponseContentLength() throws IOException {
126126

127127
if (this.response != null) {
128128

129-
return this.response.headers() //
130-
.firstValueAsLong(HttpTransportConstants.HEADER_CONTENT_LENGTH) //
131-
.orElse(-1);
129+
return this.response.headers().firstValueAsLong(HttpTransportConstants.HEADER_CONTENT_LENGTH).orElse(-1);
132130
}
133131

134132
return 0;

spring-ws-core/src/test/java/org/springframework/ws/server/endpoint/adapter/method/SourcePayloadMethodProcessorTest.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ protected AbstractPayloadSourceMethodProcessor createProcessor() {
4040
@Override
4141
protected MethodParameter[] createSupportedParameters() throws NoSuchMethodException {
4242

43-
return new MethodParameter[] { //
44-
new MethodParameter(getClass().getMethod("source", Source.class), 0),
43+
return new MethodParameter[] { new MethodParameter(getClass().getMethod("source", Source.class), 0),
4544
new MethodParameter(getClass().getMethod("dom", DOMSource.class), 0),
4645
new MethodParameter(getClass().getMethod("sax", SAXSource.class), 0),
4746
new MethodParameter(getClass().getMethod("stream", StreamSource.class), 0),
@@ -51,8 +50,7 @@ protected MethodParameter[] createSupportedParameters() throws NoSuchMethodExcep
5150
@Override
5251
protected MethodParameter[] createSupportedReturnTypes() throws NoSuchMethodException {
5352

54-
return new MethodParameter[] { //
55-
new MethodParameter(getClass().getMethod("source", Source.class), -1),
53+
return new MethodParameter[] { new MethodParameter(getClass().getMethod("source", Source.class), -1),
5654
new MethodParameter(getClass().getMethod("dom", DOMSource.class), -1),
5755
new MethodParameter(getClass().getMethod("sax", SAXSource.class), -1),
5856
new MethodParameter(getClass().getMethod("stream", StreamSource.class), -1),

spring-ws-core/src/test/java/org/springframework/ws/server/endpoint/adapter/method/XPathParamMethodArgumentResolverTest.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,9 @@ public void resolveNamespacesClass() throws Exception {
205205
public void unsupported(String s) {
206206
}
207207

208-
public void supportedTypes( //
209-
@XPathParam("/root/child") boolean param1, //
210-
@XPathParam("/root/child/number") double param2, //
211-
@XPathParam("/root/child") Node param3, //
212-
@XPathParam("/root/*") NodeList param4, //
213-
@XPathParam("/root/child/text") String param5) {
208+
public void supportedTypes(@XPathParam("/root/child") boolean param1,
209+
@XPathParam("/root/child/number") double param2, @XPathParam("/root/child") Node param3,
210+
@XPathParam("/root/*") NodeList param4, @XPathParam("/root/child/text") String param5) {
214211
}
215212

216213
public void convertedType(@XPathParam("/root/child/number") int param) {

spring-ws-core/src/test/java/org/springframework/ws/server/endpoint/mapping/PayloadRootAnnotationMethodEndpointMappingTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ public void doIt(@RequestPayload Source payload) {
156156
logger.info("In doIt()");
157157
}
158158

159-
@PayloadRoots({ //
160-
@PayloadRoot(localPart = "Request1", namespace = "http://springframework.org/spring-ws"),
159+
@PayloadRoots({ @PayloadRoot(localPart = "Request1", namespace = "http://springframework.org/spring-ws"),
161160
@PayloadRoot(localPart = "Request2", namespace = "http://springframework.org/spring-ws") })
162161
public void doItMultiple() {
163162
}

spring-ws-core/src/test/java/org/springframework/ws/soap/addressing/AbstractWsAddressingTest.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ protected void assertXMLSimilar(SaajSoapMessage expected, SaajSoapMessage result
5858
Document resultDocument = result.getSaajMessage().getSOAPPart();
5959

6060
XmlAssert.assertThat(resultDocument)
61-
.and(expectedDocument) //
62-
.ignoreWhitespace() //
63-
.ignoreChildNodesOrder() //
61+
.and(expectedDocument)
62+
.ignoreWhitespace()
63+
.ignoreChildNodesOrder()
6464
.areSimilar();
6565
}
6666

@@ -69,10 +69,7 @@ protected void assertXMLNotSimilar(SaajSoapMessage expected, SaajSoapMessage res
6969
Document expectedDocument = expected.getSaajMessage().getSOAPPart();
7070
Document resultDocument = result.getSaajMessage().getSOAPPart();
7171

72-
XmlAssert.assertThat(resultDocument)
73-
.and(expectedDocument) //
74-
.ignoreWhitespace() //
75-
.areNotSimilar();
72+
XmlAssert.assertThat(resultDocument).and(expectedDocument).ignoreWhitespace().areNotSimilar();
7673
}
7774

7875
}

spring-ws-core/src/test/java/org/springframework/ws/transport/http/HttpComponents5ContentTypeIntegrationTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ protected HttpComponents5MessageSender createMessageSender() {
3333
return chain.proceed(request, scope);
3434
};
3535

36-
HttpClient client = HttpClientBuilder.create() //
37-
.addRequestInterceptorFirst(new HttpComponents5MessageSender.RemoveSoapHeadersInterceptor()) //
38-
.addExecInterceptorFirst("handler with assertion", testHandler) //
36+
HttpClient client = HttpClientBuilder.create()
37+
.addRequestInterceptorFirst(new HttpComponents5MessageSender.RemoveSoapHeadersInterceptor())
38+
.addExecInterceptorFirst("handler with assertion", testHandler)
3939
.build();
4040

4141
return new HttpComponents5MessageSender(client);

spring-ws-test/src/main/java/org/springframework/ws/test/support/matcher/xmlunit2/PayloadDiffMatcher.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ protected Diff createDiff(Source payload) {
6767
Document expectedDocument = createDocumentFromSource(this.expected);
6868
Document actualDocument = createDocumentFromSource(payload);
6969

70-
return DiffBuilder.compare(expectedDocument) //
71-
.withTest(actualDocument) //
72-
.ignoreWhitespace() //
70+
return DiffBuilder.compare(expectedDocument)
71+
.withTest(actualDocument)
72+
.ignoreWhitespace()
7373
.withDifferenceEvaluator(
7474
DifferenceEvaluators.chain(new PlaceholderDifferenceEvaluator(), DifferenceEvaluators.Default))
75-
.checkForSimilar() //
75+
.checkForSimilar()
7676
.build();
7777
}
7878

spring-xml/src/test/java/org/springframework/xml/xsd/commons/CommonsXsdSchemaCollectionTest.java

+2-8
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,15 @@ public void testInlineComplex() throws Exception {
8585
DOMResult domResult = new DOMResult();
8686
this.transformer.transform(schemas[0].getSource(), domResult);
8787

88-
XmlAssert.assertThat(domResult.getNode())
89-
.and(expected) //
90-
.ignoreWhitespace() //
91-
.areIdentical();
88+
XmlAssert.assertThat(domResult.getNode()).and(expected).ignoreWhitespace().areIdentical();
9289
assertThat(schemas[1].getTargetNamespace()).isEqualTo("urn:2");
9390

9491
Resource cd = new ClassPathResource("CD.xsd", AbstractXsdSchemaTest.class);
9592
expected = this.documentBuilder.parse(SaxUtils.createInputSource(cd));
9693
domResult = new DOMResult();
9794
this.transformer.transform(schemas[1].getSource(), domResult);
9895

99-
XmlAssert.assertThat(domResult.getNode())
100-
.and(expected) //
101-
.ignoreWhitespace() //
102-
.areIdentical();
96+
XmlAssert.assertThat(domResult.getNode()).and(expected).ignoreWhitespace().areIdentical();
10397
}
10498

10599
@Test

0 commit comments

Comments
 (0)