Skip to content

Commit c81e11d

Browse files
committed
Polishing
1 parent de6180b commit c81e11d

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2022 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.
@@ -53,7 +53,7 @@
5353
* @author Juergen Hoeller
5454
* @since 2.5
5555
* @see java.sql.SQLTransientException
56-
* @see java.sql.SQLTransientException
56+
* @see java.sql.SQLNonTransientException
5757
* @see java.sql.SQLRecoverableException
5858
*/
5959
public class SQLExceptionSubclassTranslator extends AbstractFallbackSQLExceptionTranslator {

spring-web/src/main/java/org/springframework/http/codec/multipart/DefaultParts.java

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 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.
@@ -100,13 +100,12 @@ private static Part partInternal(HttpHeaders headers, Content content) {
100100

101101

102102
/**
103-
* Abstract base class.
103+
* Abstract base class for {@link Part} implementations.
104104
*/
105105
private static abstract class AbstractPart implements Part {
106106

107107
private final HttpHeaders headers;
108108

109-
110109
protected AbstractPart(HttpHeaders headers) {
111110
Assert.notNull(headers, "HttpHeaders is required");
112111
this.headers = headers;
@@ -119,7 +118,6 @@ public String name() {
119118
return name;
120119
}
121120

122-
123121
@Override
124122
public HttpHeaders headers() {
125123
return this.headers;
@@ -172,7 +170,6 @@ private static class DefaultPart extends AbstractPart {
172170

173171
protected final Content content;
174172

175-
176173
public DefaultPart(HttpHeaders headers, Content content) {
177174
super(headers);
178175
this.content = content;
@@ -198,7 +195,6 @@ public String toString() {
198195
return "DefaultPart";
199196
}
200197
}
201-
202198
}
203199

204200

@@ -213,7 +209,7 @@ public DefaultFilePart(HttpHeaders headers, Content content) {
213209

214210
@Override
215211
public String filename() {
216-
String filename = this.headers().getContentDisposition().getFilename();
212+
String filename = headers().getContentDisposition().getFilename();
217213
Assert.state(filename != null, "No filename found");
218214
return filename;
219215
}
@@ -235,7 +231,6 @@ public String toString() {
235231
return "DefaultFilePart{(" + filename + ")}";
236232
}
237233
}
238-
239234
}
240235

241236

@@ -249,22 +244,20 @@ private interface Content {
249244
Mono<Void> transferTo(Path dest);
250245

251246
Mono<Void> delete();
252-
253247
}
254248

249+
255250
/**
256251
* {@code Content} implementation based on a flux of data buffers.
257252
*/
258253
private static final class FluxContent implements Content {
259254

260255
private final Flux<DataBuffer> content;
261256

262-
263257
public FluxContent(Flux<DataBuffer> content) {
264258
this.content = content;
265259
}
266260

267-
268261
@Override
269262
public Flux<DataBuffer> content() {
270263
return this.content;
@@ -279,7 +272,6 @@ public Mono<Void> transferTo(Path dest) {
279272
public Mono<Void> delete() {
280273
return Mono.empty();
281274
}
282-
283275
}
284276

285277

@@ -292,13 +284,11 @@ private static final class FileContent implements Content {
292284

293285
private final Scheduler scheduler;
294286

295-
296287
public FileContent(Path file, Scheduler scheduler) {
297288
this.file = file;
298289
this.scheduler = scheduler;
299290
}
300291

301-
302292
@Override
303293
public Flux<DataBuffer> content() {
304294
return DataBufferUtils.readByteChannel(

0 commit comments

Comments
 (0)