You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/01/19 12:47:00 UTC
[commons-io] branch master updated: Add @SuppressWarnings("resource") // no allocation
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 70d16028 Add @SuppressWarnings("resource") // no allocation
70d16028 is described below
commit 70d16028c81a8eca15093db794c51f00c97527f9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jan 19 07:46:55 2023 -0500
Add @SuppressWarnings("resource") // no allocation
Javadoc tweaks
---
.../org/apache/commons/io/output/FilterCollectionWriter.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java b/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
index eadcff83..f6c0aa8e 100644
--- a/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
+++ b/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
@@ -89,6 +89,7 @@ public class FilterCollectionWriter extends Writer {
return forAllWriters(w -> w.append(csq, start, end));
}
+ @SuppressWarnings("resource") // no allocation
@Override
public void close() throws IOException {
forAllWriters(Writer::close);
@@ -99,6 +100,7 @@ public class FilterCollectionWriter extends Writer {
*
* @throws IOException If an I/O error occurs
*/
+ @SuppressWarnings("resource") // no allocation
@Override
public void flush() throws IOException {
forAllWriters(Writer::flush);
@@ -109,6 +111,7 @@ public class FilterCollectionWriter extends Writer {
return this;
}
+ @SuppressWarnings("resource") // no allocation
@Override
public void write(final char[] cbuf) throws IOException {
forAllWriters(w -> w.write(cbuf));
@@ -120,9 +123,9 @@ public class FilterCollectionWriter extends Writer {
* @param cbuf Buffer of characters to be written
* @param off Offset from which to start reading characters
* @param len Number of characters to be written
- *
* @throws IOException If an I/O error occurs
*/
+ @SuppressWarnings("resource") // no allocation
@Override
public void write(final char[] cbuf, final int off, final int len) throws IOException {
forAllWriters(w -> w.write(cbuf, off, len));
@@ -133,11 +136,13 @@ public class FilterCollectionWriter extends Writer {
*
* @throws IOException If an I/O error occurs
*/
+ @SuppressWarnings("resource") // no allocation
@Override
public void write(final int c) throws IOException {
forAllWriters(w -> w.write(c));
}
+ @SuppressWarnings("resource") // no allocation
@Override
public void write(final String str) throws IOException {
forAllWriters(w -> w.write(str));
@@ -149,9 +154,9 @@ public class FilterCollectionWriter extends Writer {
* @param str String to be written
* @param off Offset from which to start reading characters
* @param len Number of characters to be written
- *
* @throws IOException If an I/O error occurs
*/
+ @SuppressWarnings("resource") // no allocation
@Override
public void write(final String str, final int off, final int len) throws IOException {
forAllWriters(w -> w.write(str, off, len));