diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java index 3532753e8cc5..7e86c84fce43 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ * @author Juergen Hoeller * @since 2.5 * @see java.sql.SQLTransientException - * @see java.sql.SQLTransientException + * @see java.sql.SQLNonTransientException * @see java.sql.SQLRecoverableException */ public class SQLExceptionSubclassTranslator extends AbstractFallbackSQLExceptionTranslator { diff --git a/spring-web/src/main/java/org/springframework/http/codec/multipart/DefaultParts.java b/spring-web/src/main/java/org/springframework/http/codec/multipart/DefaultParts.java index 284c82497b96..8f6403f8eed4 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/multipart/DefaultParts.java +++ b/spring-web/src/main/java/org/springframework/http/codec/multipart/DefaultParts.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,13 +100,12 @@ private static Part partInternal(HttpHeaders headers, Content content) { /** - * Abstract base class. + * Abstract base class for {@link Part} implementations. */ private static abstract class AbstractPart implements Part { private final HttpHeaders headers; - protected AbstractPart(HttpHeaders headers) { Assert.notNull(headers, "HttpHeaders is required"); this.headers = headers; @@ -119,7 +118,6 @@ public String name() { return name; } - @Override public HttpHeaders headers() { return this.headers; @@ -172,7 +170,6 @@ private static class DefaultPart extends AbstractPart { protected final Content content; - public DefaultPart(HttpHeaders headers, Content content) { super(headers); this.content = content; @@ -198,7 +195,6 @@ public String toString() { return "DefaultPart"; } } - } @@ -213,7 +209,7 @@ public DefaultFilePart(HttpHeaders headers, Content content) { @Override public String filename() { - String filename = this.headers().getContentDisposition().getFilename(); + String filename = headers().getContentDisposition().getFilename(); Assert.state(filename != null, "No filename found"); return filename; } @@ -235,7 +231,6 @@ public String toString() { return "DefaultFilePart{(" + filename + ")}"; } } - } @@ -249,9 +244,9 @@ private interface Content { Mono transferTo(Path dest); Mono delete(); - } + /** * {@code Content} implementation based on a flux of data buffers. */ @@ -259,12 +254,10 @@ private static final class FluxContent implements Content { private final Flux content; - public FluxContent(Flux content) { this.content = content; } - @Override public Flux content() { return this.content; @@ -279,7 +272,6 @@ public Mono transferTo(Path dest) { public Mono delete() { return Mono.empty(); } - } @@ -292,13 +284,11 @@ private static final class FileContent implements Content { private final Scheduler scheduler; - public FileContent(Path file, Scheduler scheduler) { this.file = file; this.scheduler = scheduler; } - @Override public Flux content() { return DataBufferUtils.readByteChannel(