Summary
Improve the description of the return value of each of the Selector.select()
methods which do not accept an action
parameter.
Problem
The current verbiage could be more precise.
Solution
Update the descriptions of the aforementioned return values to be more precise.
Specification
--- a/src/java.base/share/classes/java/nio/channels/Selector.java
+++ b/src/java.base/share/classes/java/nio/channels/Selector.java
@@ -355,7 +355,8 @@ public abstract class Selector implements Closeable {
* of the {@link #wakeup wakeup} method. </p>
*
* @return The number of keys, possibly zero, whose ready-operation sets
- * were updated by the selection operation
+ * now indicate readiness for at least one category of operations
+ * for which the channel was not previously detected to be ready
*
* @throws IOException
* If an I/O error occurs
@@ -383,8 +384,9 @@ public abstract class Selector implements Closeable {
* channel to become ready; if zero, block indefinitely;
* must not be negative
*
- * @return The number of keys, possibly zero,
- * whose ready-operation sets were updated
+ * @return The number of keys, possibly zero, whose ready-operation sets
+ * now indicate readiness for at least one category of operations
+ * for which the channel was not previously detected to be ready
*
* @throws IOException
* If an I/O error occurs
@@ -406,8 +408,9 @@ public abstract class Selector implements Closeable {
* this selector's {@link #wakeup wakeup} method is invoked, or the current
* thread is interrupted, whichever comes first. </p>
*
- * @return The number of keys, possibly zero,
- * whose ready-operation sets were updated
+ * @return The number of keys, possibly zero, whose ready-operation sets
+ * now indicate readiness for at least one category of operations
+ * for which the channel was not previously detected to be ready
- csr of
-
JDK-4750574 (se spec) Selector spec should clarify calculation of select return value
-
- Closed
-