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 b98b804d6 Deprecate LineIterator.nextLine() in favor of next()
b98b804d6 is described below

commit b98b804d63e8e5460668d635e3c92de09b0982a2
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri May 17 17:21:13 2024 -0400

    Deprecate LineIterator.nextLine() in favor of next()
---
 src/changes/changes.xml                               | 7 ++++---
 src/main/java/org/apache/commons/io/LineIterator.java | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 400352441..75292defc 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,9 +51,10 @@ The <action> type attribute can be add,update,fix,remove.
       <action dev="ggregory" type="fix"                due-to="sullis">Add 
test for CircularByteBuffer clear() #620.</action>
       <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">Add IOIterator.adapt(Iterable).</action>
       <!-- FIX -->
-      <action dev="ggregory" type="fix"                due-to="Dependabot">Add 
missing unit tests.</action>
-      <action dev="ggregory" type="fix"                
due-to="Dependabot">FileUtils.lastModifiedFileTime(File) calls 
Objects.requireNonNull() on the wrong object.</action>
-      <action dev="ggregory" type="fix"                
due-to="Dependabot">PathUtils.deleteOnExit(Path) calls Objects.requireNonNull() 
on the wrong object.</action>
+      <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">Add missing unit tests.</action>
+      <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">FileUtils.lastModifiedFileTime(File) calls Objects.requireNonNull() on 
the wrong object.</action>
+      <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">PathUtils.deleteOnExit(Path) calls Objects.requireNonNull() on the 
wrong object.</action>
+      <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">Deprecate LineIterator.nextLine() in favor of next().</action>
       <!-- UPDATE -->
       <action dev="ggregory" type="update"             
due-to="Dependabot">Bump tests commons.bytebuddy.version from 1.14.13 to 
1.14.15 #615, #621.</action>
       <action dev="ggregory" type="update"             
due-to="Dependabot">Bump tests commons-codec:commons-codec from 1.16.1 to 
1.17.0.</action>
diff --git a/src/main/java/org/apache/commons/io/LineIterator.java 
b/src/main/java/org/apache/commons/io/LineIterator.java
index 28cb62e86..93ed01d9a 100644
--- a/src/main/java/org/apache/commons/io/LineIterator.java
+++ b/src/main/java/org/apache/commons/io/LineIterator.java
@@ -166,7 +166,9 @@ public class LineIterator implements Iterator<String>, 
Closeable {
      *
      * @return the next line from the input
      * @throws NoSuchElementException if there is no line to return
+     * @deprecated Use {@link #next()}.
      */
+    @Deprecated
     public String nextLine() {
         if (!hasNext()) {
             throw new NoSuchElementException("No more lines");

Reply via email to