Community
Participate
Working Groups
Build Identifier: NPE when changing int or boolean preference for the first time Reproducible: Always Steps to Reproduce: 1. Open an an Imp language resource (so that a UniversalEditor is opened). 2. Goto the associated language preferences 3. modify any integer or boolean preference and click ok ==> NPE in error log
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.