Skip to content

ClassCastException for ServletRequestAttributes #7952

Closed
@kzwang

Description

@kzwang

0fea57d

In this commit, it casts the RequestAttribute to ServletRequestAttributes, however, in our project, we have some other RequestAttribute implementations based on AbstractRequestAttributes but not based on ServletRequestAttributes, and this fails with ClassCastException. This was working in Spring boot 2.1, but breaks in 2.2 with this change. Can this be changed to check if RequestAttribute is an instance of ServletRequestAttributes first?

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions