Uploaded image for project: 'Tiles'
  1. Tiles
  2. TILES-324

Cannot call ClassUtil.setContextClassLoader() with SecurityManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.6
    • 2.0.7, 2.1.1
    • tiles-core
    • None

    Description

      In org.apache.tiles.util.ClassUtil.instantiate(String, boolean), there are two calls to setContextClassLoader for the currentThread. This causes an issue with a SecurityManager that does not grant the RuntimePermission. In my situation, since this class is in the webapp, the second call to setContextClassLoader causes an issue, since it is in the finally clause. Two workarounds:

      1) Remove the calls to setContextClassLoader. (Not sure the necessity here.)
      2) Flag whether the first call to setContextClassLoader was originally done, and then conditionally call setContextClassLoader if it was done.

      Attachments

        Issue Links

          Activity

            People

              brenmcguire Antonio Petrelli
              ecapachedev Eddy Chan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: