You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/08/07 13:50:43 UTC
[commons-io] branch master updated: Rename test classes from "Yell"
to "Throw" prefix.
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 a5b234e Rename test classes from "Yell" to "Throw" prefix.
a5b234e is described below
commit a5b234ed6949aefbd9faefa10cee4851ab5fc3ab
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 7 09:50:35 2020 -0400
Rename test classes from "Yell" to "Throw" prefix.
---
.../io/test/ThrowOnFlushAndCloseOutputStream.java | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/test/ThrowOnFlushAndCloseOutputStream.java b/src/test/java/org/apache/commons/io/test/ThrowOnFlushAndCloseOutputStream.java
index cbf7c49..5f6f716 100644
--- a/src/test/java/org/apache/commons/io/test/ThrowOnFlushAndCloseOutputStream.java
+++ b/src/test/java/org/apache/commons/io/test/ThrowOnFlushAndCloseOutputStream.java
@@ -28,24 +28,25 @@ import org.apache.commons.io.output.ProxyOutputStream;
*/
public class ThrowOnFlushAndCloseOutputStream extends ProxyOutputStream {
- private boolean yellOnFlush;
- private boolean yellOnClose;
+ private boolean throwOnFlush;
+ private boolean throwOnClose;
/**
* @param proxy OutputStream to delegate to.
- * @param yellOnFlush True if flush() is forbidden
- * @param yellOnClose True if close() is forbidden
+ * @param throwOnFlush True if flush() is forbidden
+ * @param throwOnClose True if close() is forbidden
*/
- public ThrowOnFlushAndCloseOutputStream(final OutputStream proxy, final boolean yellOnFlush, final boolean yellOnClose) {
+ public ThrowOnFlushAndCloseOutputStream(final OutputStream proxy, final boolean throwOnFlush,
+ final boolean throwOnClose) {
super(proxy);
- this.yellOnFlush = yellOnFlush;
- this.yellOnClose = yellOnClose;
+ this.throwOnFlush = throwOnFlush;
+ this.throwOnClose = throwOnClose;
}
/** @see java.io.OutputStream#flush() */
@Override
public void flush() throws IOException {
- if (yellOnFlush) {
+ if (throwOnFlush) {
fail(getClass().getSimpleName() + ".flush() called.");
}
super.flush();
@@ -54,15 +55,15 @@ public class ThrowOnFlushAndCloseOutputStream extends ProxyOutputStream {
/** @see java.io.OutputStream#close() */
@Override
public void close() throws IOException {
- if (yellOnClose) {
+ if (throwOnClose) {
fail(getClass().getSimpleName() + ".close() called.");
}
super.close();
}
public void off() {
- yellOnFlush = false;
- yellOnClose = false;
+ throwOnFlush = false;
+ throwOnClose = false;
}
}