While tracing how the application starts, I began at the entry point and noticed line 72:
ProjectForgeApp.setSpringApplicationRunContext(context, ProjectForgeApplication.class);
This call sets two static fields — springApplicationRunContext and springApplication. Neither is ever read anywhere in the codebase.
I traced the history. These fields were connected to a shutdown() method that restarted the application after initial setup. That method was removed in commit fc7c331 (June 2021), whose commit message literally says "no restart needed anymore." The shutdown() body was deleted along with a restarted boolean, but the dead fields, the setter, and the call site were left behind.
Three things that can be removed with zero impact:
I can prepare a cleanup PR — I'll describe in detail what gets removed and why.
While tracing how the application starts, I began at the entry point and noticed line 72:
This call sets two static fields —
springApplicationRunContextandspringApplication. Neither is ever read anywhere in the codebase.I traced the history. These fields were connected to a
shutdown()method that restarted the application after initial setup. That method was removed in commitfc7c331(June 2021), whose commit message literally says "no restart needed anymore." Theshutdown()body was deleted along with arestartedboolean, but the dead fields, the setter, and the call site were left behind.Three things that can be removed with zero impact:
springApplicationRunContextfieldspringApplicationfieldsetSpringApplicationRunContext()method + the call site in the entry pointI can prepare a cleanup PR — I'll describe in detail what gets removed and why.