From 6e092bff6a4c7ff85d8f26234ac68b769bc79ff2 Mon Sep 17 00:00:00 2001
From: Doug Lea
Date: Thu, 21 Apr 2011 13:53:27 +0100
Subject: [PATCH] 7038501: Clarify meaning of "(optional)" in javadoc
Reviewed-by: chegar
---
.../java/util/concurrent/BlockingDeque.java | 24 ++++++++++++-------
.../java/util/concurrent/BlockingQueue.java | 12 ++++++----
.../java/util/concurrent/ConcurrentMap.java | 6 +++--
.../util/concurrent/CopyOnWriteArrayList.java | 12 ++++++----
4 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java b/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java
index 3134eae8ec5..7f37f7e66ea 100644
--- a/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java
+++ b/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java
@@ -400,8 +400,10 @@ public interface BlockingDeque extends BlockingQueue, Deque {
* @param o element to be removed from this deque, if present
* @return true if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
boolean removeFirstOccurrence(Object o);
@@ -416,8 +418,10 @@ public interface BlockingDeque extends BlockingQueue, Deque {
* @param o element to be removed from this deque, if present
* @return true if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
boolean removeLastOccurrence(Object o);
@@ -591,8 +595,10 @@ public interface BlockingDeque extends BlockingQueue, Deque {
* @param o element to be removed from this deque, if present
* @return true if this deque changed as a result of the call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
boolean remove(Object o);
@@ -604,8 +610,10 @@ public interface BlockingDeque extends BlockingQueue, Deque {
* @param o object to be checked for containment in this deque
* @return true if this deque contains the specified element
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
public boolean contains(Object o);
diff --git a/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java b/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java
index 9886e6da3c1..4511d27efd7 100644
--- a/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java
+++ b/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java
@@ -303,8 +303,10 @@ public interface BlockingQueue extends Queue {
* @param o element to be removed from this queue, if present
* @return true if this queue changed as a result of the call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this queue (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this queue
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
boolean remove(Object o);
@@ -316,8 +318,10 @@ public interface BlockingQueue extends Queue {
* @param o object to be checked for containment in this queue
* @return true if this queue contains the specified element
* @throws ClassCastException if the class of the specified element
- * is incompatible with this queue (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this queue
+ * (optional)
+ * @throws NullPointerException if the specified element is null
+ * (optional)
*/
public boolean contains(Object o);
diff --git a/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java b/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java
index 25cf98ff0f1..4434c0563b4 100644
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java
@@ -103,9 +103,11 @@ public interface ConcurrentMap extends Map {
* @throws UnsupportedOperationException if the remove operation
* is not supported by this map
* @throws ClassCastException if the key or value is of an inappropriate
- * type for this map (optional)
+ * type for this map
+ * (optional)
* @throws NullPointerException if the specified key or value is null,
- * and this map does not permit null keys or values (optional)
+ * and this map does not permit null keys or values
+ * (optional)
*/
boolean remove(Object key, Object value);
diff --git a/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java b/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
index 2774e61136a..785ec6fcede 100644
--- a/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
+++ b/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
@@ -631,9 +631,11 @@ public class CopyOnWriteArrayList
* @param c collection containing elements to be removed from this list
* @return true if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (optional)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (optional),
* or if the specified collection is null
* @see #remove(Object)
*/
@@ -671,9 +673,11 @@ public class CopyOnWriteArrayList
* @param c collection containing elements to be retained in this list
* @return true if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (optional)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (optional),
* or if the specified collection is null
* @see #remove(Object)
*/