diff options
author | Gary Gregory <garydgregory@gmail.com> | 2024-05-17 17:21:13 -0400 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2024-05-17 17:21:13 -0400 |
commit | b98b804d63e8e5460668d635e3c92de09b0982a2 (patch) | |
tree | fe4b1bcc1ade74857c2ec0db1c284cd6a30b402c | |
parent | 3ddf1ad58f2e0744ec866eaea37eca9da169f7f4 (diff) | |
download | apache-commons-io-upstream-master.tar.gz |
Deprecate LineIterator.nextLine() in favor of next()upstream-master
-rw-r--r-- | src/changes/changes.xml | 7 | ||||
-rw-r--r-- | 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 40035244..75292def 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 28cb62e8..93ed01d9 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"); |