Menu

#72 JFCTestCase requires call to setHelper

open
nobody
None
5
2005-08-11
2005-08-11
Byron
No

JComboBoxMouseEventData requires that its JFCTestCase
argument have a TestHelper attached via
JFCTestCase.setHelper(). This requirement is not
enforced by the API, not documented, and not specified
in the exception. For example, attempting to select an
item in a combo box with no TestHelper resident on the
JFCTestCase yields a NullPointerException at line 539
of JComboBoxMouseEventData.

My recommendation is to enforce the presence of a
TestHelper on the JFCTestCase through constructor
arguments. Also throw IllegalArgumentException on
JFCTestCase.setHelper when the argument is null.

Thanks.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB