Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-359

Performance Improvement when No SecurityManager installed

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.8, 2.0.9, 2.0.9b, 2.1.0, 2.1.5, 2.1.6, 2.1.7, 2.2.0, 2.3.0
    • 2.3.1
    • Core
    • None
    • Linux/Windows

    Description

      In class com.ibatis.common.beans.ClassInfo, when NO SecurityManager is installed, each time the method ClassInfo#canAccessPrivateMethods() is called, a NullPointer exception is thrown, it would be more performant to test for nullity:

      private boolean canAccessPrivateMethods() {
      try {
      SecurityManager manager = System.getSecurityManager();
      if (manager == null)

      { return true; }

      manager.checkPermission(new ReflectPermission("suppressAccessChecks"));
      return true;
      } catch (SecurityException e)

      { return false; }

      catch (NullPointerException e)

      { return true; }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            pmouawad Philippe Mouawad
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: