Calling an overridable method from a constructor could result in failures or strange behaviors when instantiating a subclass which overrides the method.
ErrorWindow constructor (indirectly) calls createStackTraceArea() (protected, non-final) through the following chain: initWindow() -> createMainLayout() -> createExceptionTraceLayout() -> createStackTraceArea()
Moreover, the current approach makes impossible to to extend ErrorWindow in a sane way, or configure an existing instance of ErrorWindow. In addition, O(2^n) constructors are required (since most parameters are deemed "optional").
Proposal: initialize the window on attach.
Calling an overridable method from a constructor could result in failures or strange behaviors when instantiating a subclass which overrides the method.
ErrorWindowconstructor (indirectly) callscreateStackTraceArea()(protected, non-final) through the following chain:initWindow()->createMainLayout()->createExceptionTraceLayout()->createStackTraceArea()Moreover, the current approach makes impossible to to extend
ErrorWindowin a sane way, or configure an existing instance ofErrorWindow. In addition, O(2^n) constructors are required (since most parameters are deemed "optional").Proposal: initialize the window on attach.