You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2025/02/05 22:18:00 UTC
[jira] [Comment Edited] (IO-867) Fix ThresholdingOutputStream#isThresholdExceeded
[ https://issues.apache.org/jira/browse/IO-867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922930#comment-17922930 ]
Gary D. Gregory edited comment on IO-867 at 2/5/25 10:17 PM:
-------------------------------------------------------------
Hello [~nielsm5]
Thank you for your report.
Do you have a unit test that demonstrates the issue?
See {{ThresholdingOutputStreamTest}}.
Ty
was (Author: garydgregory):
Hello [~nielsm5]
Thank you for your report.
Do you have a unit test that demonstrates the issue?
Ty
> Fix ThresholdingOutputStream#isThresholdExceeded
> ------------------------------------------------
>
> Key: IO-867
> URL: https://issues.apache.org/jira/browse/IO-867
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.18.0
> Environment: Java
> Reporter: Niels
> Priority: Critical
>
> The ThresholdingOutputStream has a beautiful boolean field called thresholdExceeded, yet the corresponding getter returns `written > threshold`.
> This means after `#thresholdReached()`, the next time `#getStream()` is called the 'threshold getter' returns false!
> This causes very inconsistent behavior...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)