Skip to content

Commit 75750db

Browse files
committed
Deprecate int CountingInputStream#getCount() in favor of long
CountingInputStream#getByteCount()
1 parent 34571f7 commit 75750db

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ The <action> type attribute can be add,update,fix,remove.
7878
<action dev="ggregory" type="fix" due-to="Elliotte Rusty Harold, Gary Gregory">Modernize temporary file creation and deletion in DeferredFileOutputStreamTest #535.</action>
7979
<action dev="ggregory" type="fix" due-to="Elliotte Rusty Harold">Add PathMatcher to IOFileFilter class Javadoc #536.</action>
8080
<action dev="ggregory" type="fix" issue="IO-781" due-to="Marcono1234">Fix CharSequenceInputStream coding exception handling #537.</action>
81+
<action dev="ggregory" type="fix" issue="IO-781" due-to="Marcono1234">Deprecate int CountingInputStream#getCount() in favor of long CountingInputStream#getByteCount().</action>
8182
<!-- Add -->
8283
<action dev="ggregory" type="add" due-to="Gary Gregory">Add and use PathUtils.getFileName(Path, Function&lt;Path, R&gt;).</action>
8384
<action dev="ggregory" type="add" due-to="Gary Gregory">Add and use PathUtils.getFileNameString().</action>

src/main/java/org/apache/commons/io/input/CountingInputStream.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ public synchronized long getByteCount() {
8181
*
8282
* @return the number of bytes accumulated
8383
* @throws ArithmeticException if the byte count is too large
84+
* @deprecated Use {@link #getByteCount()}.
8485
*/
86+
@Deprecated
8587
public int getCount() {
8688
final long result = getByteCount();
8789
if (result > Integer.MAX_VALUE) {

0 commit comments

Comments
 (0)