| Summary: | NPE when changing int or boolean preference for the first time | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Adam Taylor <awtaylor> | ||||
| Component: | IMP | Assignee: | Robert M. Fuhrer <rfuhrer> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Adam Taylor
Created attachment 178658 [details]
proposed implementation
this patch also disables the apply and ok buttons on the preferences page when a non-int string is entered into an integer field
Theoretically this should never happen, since the preference initializer should ensure that there is a legal value for each preference key. However, it might happen if the preferences DB didn't get initialized properly, so I added null guards as requested. I'm not sure why the call to notifyState() was added to StringFieldEditor.refreshValidState(), so I omitted that. If you can explain why it's needed, I'll reconsider. Changes checked into SVN trunk. |