-
Bug
-
Resolution: Duplicate
-
P2
-
7
-
x86
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2226172 | 7u6 | Unassigned | P2 | Closed | Won't Fix |
A DESCRIPTION OF THE PROBLEM :
The specification for java.util.Deque.push() states that this method
"returns true upon success", but this is not true because push() cannot return any result because it is void.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, throwing an IllegalStateException if no space is currently available.
ACTUAL -
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/7/docs/api/java/util/Deque.html#push(E)
The specification for java.util.Deque.push() states that this method
"returns true upon success", but this is not true because push() cannot return any result because it is void.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, throwing an IllegalStateException if no space is currently available.
ACTUAL -
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/7/docs/api/java/util/Deque.html#push(E)
- backported by
-
JDK-2226172 (spec) Deque.push specifies that it returns a value but the method is void
- Closed
- duplicates
-
JDK-8022087 Fix doclint issues in j.u.Deque & Queue
- Closed