Remove unnecessary security checks in property accessors

Description

Setting Method.setAccessible() and Field.setAccessible() to true helps to avoid security checks.
Currently it is executed only for non-public class members.

Code example from DirectPropertyAccessor:

if ( !ReflectHelper.isPublic(theClass, method) ) {
method.setAccessible(true);
}

Using this call for public members as well will increase the reflection call performance.

Environment

3.3.1 GA

Assignee

Brett Meyer

Reporter

Kirill Klenski

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor
Configure