Name: dsC58869 Date: 09/21/98
SRC:
...
* @(#)Frame.java 1.94 98/09/09
...
/**
* Sets the state of this frame.
* @return state <code>Frame.ICONIFIED</code> if frame in iconic state;
* <code>Frame.NORMAL</code> if frame is in normal state.
* @see java.awt.Frame#getState
*/
public synchronized void setState(int state) {
this.state = state;
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setState(state);
}
}
...
But the method returns void.
Besides, the documentation for the setState(int state) method doesn't
describe it's behaviour if state is neither Frame.NORMAL nor Frame.ICONIFIED.
======================================================================
similar to (IncidentManager ID): 42492
The Java source of awt/Frame.setState(..)
resp. Frame.getState has a wrong description in its javadoc api:
/**
* Sets the state of this frame.
* @return state <code>Frame.ICONIFIED</code> if frame in iconic state;
* <code>Frame.NORMAL</code> if frame is in normal state.
* @see java.awt.Frame#getState
*/
public synchronized void setState(int state) {
this.state = state;
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setState(state);
}
}
/**
* Gets the state of this frame.
* @param <code>Frame.ICONIFIED</code> if this frame is in iconic state;
* <code>Frame.NORMAL</code> if this frame is in normal state.
* @see java.awt.Frame#setState
*/
There is a wrong @return/@param description and the
parameter/return value description of setState and getState is
the same.
======================================================================
Justification:
Wrong specification.
======================================================================
- duplicates
-
JDK-4185448 descriptions of setState and getState for java.awt.frame are reversed
-
- Resolved
-