Skip to content

WIP: Dead code in ProjectForgeApp.setSpringApplicationRunContext — leftover from removed restart logic #347

@MaurerAnton

Description

@MaurerAnton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions