Menu

#4 NullPointerException in JComboBoxMouseED::prepareComponent

open
nobody
None
1
2007-07-19
2007-07-19
A.Safonov
No

Hi Pavel.
As designed, JFCTestCase may be used without TestHelper, so getHelper method may return NULL sometimes :)
JComboBoxMouseEventData::prepareComponent calls methods of helper without verification on null. I guess it is not correct.

It would be better
- if default JFCTestCase constructor has mandatory TestHelper parameter
or
- such calls as:
...
if (comp != null) {
MouseEventData data = new MouseEventData(testCase, comp);
testCase.getHelper().enterClickAndLeave(data);

should be changed with "comp.clickButton()" and so on...

Really it is not a problem, just a correction in design.

Discussion

  • A.Safonov

    A.Safonov - 2007-07-19
    • priority: 5 --> 1
     
  • Pavel Krupets

    Pavel Krupets - 2007-08-02

    Logged In: YES
    user_id=1007725
    Originator: NO

    thanks, will check asap

     

Log in to post a comment.

MongoDB Logo MongoDB