Skip to content

MetricsServlet is overriding init(ServletConfig config) method without calling super.init(config) #739

@s0ar

Description

@s0ar

Since version 0.12.0 the Servlet init is broken for further customization. The MetricsServlet overrides init(ServletConfig config) method from the from GenericServlet.class (javax.servlet-api) without calling super.init(config) as described in the JavaDoc.

Called by the servlet container to indicate to a servlet that the servlet is being placed into service. See Servlet.init.
This implementation stores the ServletConfig object it receives from the servlet container for later use. When overriding this form of the method, call super.init(config).

This leads to not calling the GenericServlet.init() method which might be used for further initialization code.
Thus, a call to super.init(servletConfig) in MetricsServlet.init method should fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions