Skip to content

Commit 72835f1

Browse files
committed
Polishing
1 parent 125ebd0 commit 72835f1

File tree

6 files changed

+20
-24
lines changed

6 files changed

+20
-24
lines changed

spring-core/src/main/java/org/springframework/core/io/Resource.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -152,8 +152,7 @@ default byte[] getContentAsByteArray() throws IOException {
152152
}
153153

154154
/**
155-
* Returns the contents of this resource as a string, using the specified
156-
* charset.
155+
* Return the contents of this resource as a string, using the specified charset.
157156
* @param charset the charset to use for decoding
158157
* @return the contents of this resource as a {@code String}
159158
* @throws java.io.FileNotFoundException if the resource cannot be resolved as

spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java

Lines changed: 3 additions & 3 deletions
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-2024 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.
@@ -45,8 +45,8 @@
4545
* lobCreator.setBlobAsBinaryStream(ps, 2, contentStream, contentLength);
4646
* lobCreator.setClobAsString(ps, 3, description);
4747
* }
48-
* }
49-
* );</pre>
48+
* });
49+
* </pre>
5050
*
5151
* @author Juergen Hoeller
5252
* @since 1.0.2

spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -41,13 +41,13 @@
4141
* final LobHandler lobHandler = new DefaultLobHandler(); // reusable object
4242
*
4343
* jdbcTemplate.query(
44-
* "SELECT content FROM imagedb WHERE image_name=?", new Object[] {name},
45-
* new AbstractLobStreamingResultSetExtractor() {
46-
* public void streamData(ResultSet rs) throws SQLException, IOException {
47-
* FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), contentStream);
48-
* }
49-
* }
50-
* );</pre>
44+
* "SELECT content FROM imagedb WHERE image_name=?", new Object[] {name},
45+
* new AbstractLobStreamingResultSetExtractor() {
46+
* public void streamData(ResultSet rs) throws SQLException, IOException {
47+
* FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), contentStream);
48+
* }
49+
* });
50+
* </pre>
5151
*
5252
* @author Juergen Hoeller
5353
* @since 1.0.2

spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -209,7 +209,7 @@ else if (this.content instanceof Reader reader) {
209209
}
210210

211211
/**
212-
* Close the LobCreator, if any.
212+
* Close the LobCreator.
213213
*/
214214
@Override
215215
public void cleanup() {

spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlValue.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -20,9 +20,7 @@
2020

2121
/**
2222
* Subinterface of {@link org.springframework.jdbc.support.SqlValue}
23-
* that supports passing in XML data to specified column and adds a
24-
* cleanup callback, to be invoked after the value has been set and
25-
* the corresponding statement has been executed.
23+
* that specifically indicates passing in XML data to a specified column.
2624
*
2725
* @author Thomas Risberg
2826
* @since 2.5.5

spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -106,10 +106,9 @@ protected Long getContentLength(String str, @Nullable MediaType contentType) {
106106
@Override
107107
protected void addDefaultHeaders(HttpHeaders headers, String s, @Nullable MediaType type) throws IOException {
108108
if (headers.getContentType() == null ) {
109-
if (type != null && type.isConcrete() &&
110-
(type.isCompatibleWith(MediaType.APPLICATION_JSON) ||
109+
if (type != null && type.isConcrete() && (type.isCompatibleWith(MediaType.APPLICATION_JSON) ||
111110
type.isCompatibleWith(APPLICATION_PLUS_JSON))) {
112-
// Prevent charset parameter for JSON..
111+
// Prevent charset parameter for JSON.
113112
headers.setContentType(type);
114113
}
115114
}

0 commit comments

Comments
 (0)