Skip to content

Method jakarta.servlet.http.HttpSession#getAttribute should be generic typed #1063

Description

@Asconius

In Jakarta 11, the return type of the jakarta.servlet.http.HttpSession#getAttribute method is Object.

It would be better if the return type could be defined:
var attribute = httpSession.<String>getAttribute("attribute");

The type signature would look like this:
<T> T getAttribute(String name)

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