Skip to content

Consistently catch InaccessibleObjectException next to IllegalAccessException #35190

@jhoeller

Description

@jhoeller

In the course of #34028, it turned out that the Java 9+ InaccessibleObjectException should be equivalently caught wherever we have special treatment of IllegalAccessException since the former is thrown from setAccessible whereas the latter is thrown from Method.invoke. With the Java Platform Module System, setAccessible may fail when we try to call it on non-public classes.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions