Community
Participate
Working Groups
Created attachment 206334 [details] Patch that removes the unnecessary (and "fatal") statement on line 189 of ErrorHandler. If you throw a VetoException without a title during start up of an AbstractSwingApplication (e.g. to deny access to a user which tries to log in) the application will crash with a NullPointerException. The NullPointerException occurs because in AbstractSwingApplication:200 (showLoadError) handler.getText() is null. The reason why the text is null is because in ErrorHandler:189 it is set to null if the VetoException has no title. Actually at this point the text (m_text) is already set to ScoutTexts.get("Error") (see lines 99 to 102 at the beginning of the parse method) and will now become null. Attached is a patch that removes the unnecessary (and "fatal") statement on line 189 of ErrorHandler. It may also be reasonable to handle the "null" case in AbstractSwingApplication:200 - this is left up to you.
obsolete since swing got legacy.