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/05/13 14:16:08 UTC

[commons-io] 07/08: Add @SuppressWarnings("resource")

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

commit 5dc5111e924161ec1246fb65fa4ad264c967c894
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat May 13 10:08:07 2023 -0400

    Add @SuppressWarnings("resource")
---
 src/main/java/org/apache/commons/io/LineIterator.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/commons/io/LineIterator.java b/src/main/java/org/apache/commons/io/LineIterator.java
index 6c67af17..d32f7540 100644
--- a/src/main/java/org/apache/commons/io/LineIterator.java
+++ b/src/main/java/org/apache/commons/io/LineIterator.java
@@ -80,6 +80,7 @@ public class LineIterator implements Iterator<String>, Closeable {
      * @param reader the {@link Reader} to read from, not null
      * @throws IllegalArgumentException if the reader is null
      */
+    @SuppressWarnings("resource") // Caller closes Reader
     public LineIterator(final Reader reader) throws IllegalArgumentException {
         Objects.requireNonNull(reader, "reader");
         if (reader instanceof BufferedReader) {