Skip to content

Commit 29b35b4

Browse files
committed
Better names and messages.
1 parent b212baa commit 29b35b4

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*/
5656
public class QueueInputStream extends InputStream {
5757

58-
private final BlockingQueue<Integer> queue;
58+
private final BlockingQueue<Integer> blockingQueue;
5959

6060
/**
6161
* Constructs a new instance with no limit to its internal buffer size.
@@ -67,10 +67,10 @@ public QueueInputStream() {
6767
/**
6868
* Constructs a new instance with given buffer
6969
*
70-
* @param queue backing queue for the stream
70+
* @param blockingQueue backing queue for the stream
7171
*/
72-
public QueueInputStream(final BlockingQueue<Integer> queue) {
73-
this.queue = Objects.requireNonNull(queue, "queue is required");
72+
public QueueInputStream(final BlockingQueue<Integer> blockingQueue) {
73+
this.blockingQueue = Objects.requireNonNull(blockingQueue, "blockingQueue");
7474
}
7575

7676
/**
@@ -80,7 +80,7 @@ public QueueInputStream(final BlockingQueue<Integer> queue) {
8080
* @return QueueOutputStream connected to this stream
8181
*/
8282
public QueueOutputStream newQueueOutputStream() {
83-
return new QueueOutputStream(queue);
83+
return new QueueOutputStream(blockingQueue);
8484
}
8585

8686
/**
@@ -90,7 +90,7 @@ public QueueOutputStream newQueueOutputStream() {
9090
*/
9191
@Override
9292
public int read() {
93-
final Integer value = queue.poll();
93+
final Integer value = blockingQueue.poll();
9494
return value == null ? -1 : ((0xFF) & value);
9595
}
9696

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555
public class QueueOutputStream extends OutputStream {
5656

57-
private final BlockingQueue<Integer> queue;
57+
private final BlockingQueue<Integer> blockingQueue;
5858

5959
/**
6060
* Constructs a new instance with no limit to internal buffer size.
@@ -66,10 +66,10 @@ public QueueOutputStream() {
6666
/**
6767
* Constructs a new instance with given buffer.
6868
*
69-
* @param queue backing queue for the stream
69+
* @param blockingQueue backing queue for the stream
7070
*/
71-
public QueueOutputStream(final BlockingQueue<Integer> queue) {
72-
this.queue = Objects.requireNonNull(queue, "queue is required");
71+
public QueueOutputStream(final BlockingQueue<Integer> blockingQueue) {
72+
this.blockingQueue = Objects.requireNonNull(blockingQueue, "blockingQueue");
7373
}
7474

7575
/**
@@ -79,7 +79,7 @@ public QueueOutputStream(final BlockingQueue<Integer> queue) {
7979
* @return QueueInputStream connected to this stream
8080
*/
8181
public QueueInputStream newQueueInputStream() {
82-
return new QueueInputStream(queue);
82+
return new QueueInputStream(blockingQueue);
8383
}
8484

8585
/**
@@ -90,7 +90,7 @@ public QueueInputStream newQueueInputStream() {
9090
@Override
9191
public void write(final int b) throws InterruptedIOException {
9292
try {
93-
queue.put(0xFF & b);
93+
blockingQueue.put(0xFF & b);
9494
} catch (InterruptedException e) {
9595
Thread.currentThread().interrupt();
9696
final InterruptedIOException interruptedIoException = new InterruptedIOException();

0 commit comments

Comments
 (0)