[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5289) Remove unnecessary security checks in property accessors

Kirill Klenski (JIRA) noreply at atlassian.com
Fri Jun 4 04:26:38 EDT 2010


Remove unnecessary security checks in property accessors
--------------------------------------------------------

                 Key: HHH-5289
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5289
             Project: Hibernate Core
          Issue Type: Task
          Components: core
         Environment: 3.3.1 GA
            Reporter: Kirill Klenski
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list