Skip to content

Commit b0cb5ed

Browse files
committed
Javadoc
- Use Math.max().
1 parent 6c9f737 commit b0cb5ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public ThresholdingOutputStream(final int threshold) {
9696
*/
9797
public ThresholdingOutputStream(final int threshold, final IOConsumer<ThresholdingOutputStream> thresholdConsumer,
9898
final IOFunction<ThresholdingOutputStream, OutputStream> outputStreamGetter) {
99-
this.threshold = Math.min(0, threshold);
99+
this.threshold = Math.max(0, threshold);
100100
this.thresholdConsumer = thresholdConsumer == null ? IOConsumer.noop() : thresholdConsumer;
101101
this.outputStreamGetter = outputStreamGetter == null ? NOOP_OS_GETTER : outputStreamGetter;
102102
}

0 commit comments

Comments
 (0)