diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java index 42f415cba557..99135870c6c9 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2024 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. @@ -45,8 +45,8 @@ * lobCreator.setBlobAsBinaryStream(ps, 2, contentStream, contentLength); * lobCreator.setClobAsString(ps, 3, description); * } - * } - * ); + * }); + * * * @author Juergen Hoeller * @since 1.0.2 diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java index 5427df20526c..7b6de1078e88 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2024 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. @@ -41,13 +41,13 @@ * final LobHandler lobHandler = new DefaultLobHandler(); // reusable object * * jdbcTemplate.query( - * "SELECT content FROM imagedb WHERE image_name=?", new Object[] {name}, - * new AbstractLobStreamingResultSetExtractor() { - * public void streamData(ResultSet rs) throws SQLException, IOException { - * FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), contentStream); - * } - * } - * ); + * "SELECT content FROM imagedb WHERE image_name=?", new Object[] {name}, + * new AbstractLobStreamingResultSetExtractor() { + * public void streamData(ResultSet rs) throws SQLException, IOException { + * FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), contentStream); + * } + * }); + * * * @author Juergen Hoeller * @since 1.0.2 diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java index ffc853f5e084..43bdff36c539 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 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. @@ -209,7 +209,7 @@ else if (this.content instanceof Reader) { } /** - * Close the LobCreator, if any. + * Close the LobCreator. */ @Override public void cleanup() { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlValue.java index 3d45d467c28e..d662a9271ae3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlValue.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2024 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. @@ -20,9 +20,7 @@ /** * Subinterface of {@link org.springframework.jdbc.support.SqlValue} - * that supports passing in XML data to specified column and adds a - * cleanup callback, to be invoked after the value has been set and - * the corresponding statement has been executed. + * that specifically indicates passing in XML data to a specified column. * * @author Thomas Risberg * @since 2.5.5 diff --git a/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java index b45c9ddeb82b..6da38db05bfa 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2024 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. @@ -106,10 +106,9 @@ protected Long getContentLength(String str, @Nullable MediaType contentType) { @Override protected void addDefaultHeaders(HttpHeaders headers, String s, @Nullable MediaType type) throws IOException { if (headers.getContentType() == null ) { - if (type != null && type.isConcrete() && - (type.isCompatibleWith(MediaType.APPLICATION_JSON) || + if (type != null && type.isConcrete() && (type.isCompatibleWith(MediaType.APPLICATION_JSON) || type.isCompatibleWith(APPLICATION_PLUS_JSON))) { - // Prevent charset parameter for JSON.. + // Prevent charset parameter for JSON. headers.setContentType(type); } }