SUGGESTED FIX
Name: rpR10076 Date: 07/10/2003
***************
*** 68,76 ****
/**
* The label of the Checkbox.
! * This field can be null. If a label is not specified it
! * defaults to null or "".
! * @serial
* @see #getLabel()
* @see #setLabel(label)
*/
--- 68,75 ----
/**
* The label of the Checkbox.
! * This field can be null.
! * @serial
* @see #getLabel()
* @see #setLabel(label)
*/
***************
*** 117,125 ****
}
/**
! * Creates a check box with no label. The state of this
! * check box is set to "off," and it is not part of any
! * check box group.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
--- 116,124 ----
}
/**
! * Creates a check box with an empty string for its label.
! * The state of this check box is set to "off," and it is not
! * part of any check box group.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
======================================================================
|
EVALUATION
We should update the spec, and be clear about null vs. empty string for
ctors, setLabel, getLabel, etc.
###@###.### 2002-02-04
Unfortunately, the spec explicitly says null, while we believe that the current
behaviour is more correct than the spec. Moreover, if we change the behaviour
now to match the spec, existing apps can start throwing NPEs.
We can't chnage the spec this way in update release, too, so we have to commit
this bug to tiger instead.
###@###.### 2002-09-12
Name: rpR10076 Date: 07/10/2003
The decision was to change the documentation rather than the implementation.
CCC-daemon announcement from 2003/04/28 says about the approval.
So the behaviour is now correct.
Please see diffs to Checkbox.java doc in suggested fix section.
======================================================================
|