JavaClass.java is calling setAccessible too much
------------------------------------------------

                 Key: JRUBY-4294
                 URL: http://jira.codehaus.org/browse/JRUBY-4294
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
            Reporter: John Woodell
            Priority: Critical
             Fix For: JRuby 1.4


The JRuby runtime will spin-up faster without these setAccessible calls.

        // called only by initializing thread; no synchronization required
        void addMethod(Method method, Class<?> javaClass) {
            if (methods == null) {
                methods = new ArrayList<Method>(4);
            }
          /////////////////////////////////////////////
          //
          //  THIS IS TOO EXPENSIVE
          //
          //  if (!Ruby.isSecurityRestricted()) {
          //      try {
          //          method.setAccessible(true);
          //      } catch(SecurityException e) {}
          //  }
          //
          /////////////////////////////////////////////
            methods.add(method);
            haveLocalMethod |= javaClass == method.getDeclaringClass();
        }



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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to